- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 254
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-11-23
|
¦^´_ 6# owen9399 - Sub All_Paper() '¥þ³¡¦~³ø
- Dim Sh As Worksheet, A As Range, C As Range, Ay()
- For Each Sh In Sheets(Array("¤p«¬ªÑ", "¤j«¬ªÑ"))
- With Sh
- Set A = .[A:A].Find("¤½¥q§Ç¸¹", .[A65536], lookat:=xlWhole)
- Do Until Application.CountA(A.Offset(, 1).Resize(, 12)) = 0
- r = A.Row
- r1 = .Range("A:A").Find("¦Xp", A, lookat:=xlWhole).Row
- r2 = .Range("A:A").FindNext(.Cells(r1, 1)).Row
- For Each C In A.Offset(, 1).Resize(, 12).SpecialCells(xlCellTypeConstants)
- k = C.Column
- ReDim Preserve Ay(s)
- Ay(s) = Array(.Cells(r, k).Value, .Cells(r + 1, k).Value, .Cells(r1 + 1, k - 1).Value, .Cells(r1, k).Value, .Cells(r1 + 1, k + 1).Value, .Cells(r2, k).Value, .Cells(r2 + 1, k).Value)
- s = s + 1
- Next
- Set A = .Range("A:A").Find("¤½¥q§Ç¸¹", .Cells(r2, 1), lookat:=xlWhole)
- Loop
- End With
- Next
- If s > 0 Then
- With Sheets("¥þ³¡¤½¥qÁ`¦~³ø")
- .[A2].Resize(s, 7) = Application.Transpose(Application.Transpose(Ay))
- .Range("A1").CurrentRegion.Sort key1:=.[A1], Header:=xlYes
- End With
- End If
- End Sub
- Sub S_Paper() '¤p«¬ªÑ¦~³ø
- Dim A As Range, C As Range, Ay()
- With Sheets("¤p«¬ªÑ")
- Set A = .[A:A].Find("¤½¥q§Ç¸¹", .[A65536], lookat:=xlWhole)
- Do Until Application.CountA(A.Offset(, 1).Resize(, 12)) = 0
- r = A.Row
- r1 = .Range("A:A").Find("¦Xp", A, lookat:=xlWhole).Row
- r2 = .Range("A:A").FindNext(.Cells(r1, 1)).Row
- For Each C In A.Offset(, 1).Resize(, 12).SpecialCells(xlCellTypeConstants)
- k = C.Column
- ReDim Preserve Ay(s)
- Ay(s) = Array(.Cells(r, k).Text, .Cells(r + 1, k).Value, .Cells(r1 + 1, k - 1).Value, .Cells(r1, k).Value, .Cells(r1 + 1, k + 1).Value, .Cells(r2, k).Value, .Cells(r2 + 1, k).Value)
- s = s + 1
- Next
- Set A = .Range("A:A").Find("¤½¥q§Ç¸¹", .Cells(r2, 1), lookat:=xlWhole)
- Loop
- End With
- If s > 0 Then
- With Sheets("¤p«¬ªÑ¦~³ø")
- .[A2].Resize(s, 7) = Application.Transpose(Application.Transpose(Ay))
- .Range("A1").CurrentRegion.Sort key1:=.[A1], Header:=xlYes
- End With
- End If
- End Sub
- Sub U_Paper() '¤j«¬ªÑ¦~³ø
- Dim A As Range, C As Range, Ay()
- With Sheets("¤j«¬ªÑ")
- Set A = .[A:A].Find("¤½¥q§Ç¸¹", .[A65536], lookat:=xlWhole)
- Do Until Application.CountA(A.Offset(, 1).Resize(, 12)) = 0
- r = A.Row
- r1 = .Range("A:A").Find("¦Xp", A, lookat:=xlWhole).Row
- r2 = .Range("A:A").FindNext(.Cells(r1, 1)).Row
- For Each C In A.Offset(, 1).Resize(, 12).SpecialCells(xlCellTypeConstants)
- k = C.Column
- ReDim Preserve Ay(s)
- Ay(s) = Array(.Cells(r, k).Text, .Cells(r + 1, k).Value, .Cells(r1 + 1, k - 1).Value, .Cells(r1, k).Value, .Cells(r1 + 1, k + 1).Value, .Cells(r2, k).Value, .Cells(r2 + 1, k).Value)
- s = s + 1
- Next
- Set A = .Range("A:A").Find("¤½¥q§Ç¸¹", .Cells(r2, 1), lookat:=xlWhole)
- Loop
- End With
- If s > 0 Then
- With Sheets("¤j«¬ªÑ¦~³ø")
- .[A2].Resize(s, 7) = Application.Transpose(Application.Transpose(Ay))
- .Range("A1").CurrentRegion.Sort key1:=.[A1], Header:=xlYes
- End With
- End If
- End Sub
½Æ»s¥N½X |
|