- ©«¤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
|
¦^´_ 3# luke - Sub ex()
- Dim Rng As Range, A As Range, Ar()
- k = 1
- For Each sh In Sheets(Array("sheet1", "sheet2"))
- With sh
- For i = 1 To 2
- Set Rng = Nothing
- For Each A In .Range(.[A1], .Cells(.Rows.Count, 1).End(xlUp))
- If A.Interior.ColorIndex = i * 3 Then
- ReDim Preserve Ar(s)
- Ar(s) = Array(A, A.Offset(, 1), "", "", A.Offset(, 2))
- s = s + 1
- End If
- Next
- r = Application.CountA(sheet3.Columns(k)) + 1
- If s > 0 Then
- With sheet3.Cells(r, k).Resize(s, 5)
- .Value = Application.Transpose(Application.Transpose(Ar)): Erase Ar: s = 0
- .Interior.ColorIndex = i * 3
- End With
- End If
- Next
- End With
- k = k + 5
- Next
- End Sub
½Æ»s¥N½X |
|