- ©«¤l
- 75
- ¥DÃD
- 8
- ºëµØ
- 0
- ¿n¤À
- 109
- ÂI¦W
- 0
- §@·~¨t²Î
- windows XP
- ³nÅ骩¥»
- office 2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- °ª¶¯
- µù¥U®É¶¡
- 2015-4-19
- ³Ì«áµn¿ý
- 2024-8-10
|
Sub Ex1_20171031()
Application.ScreenUpdating = False
Worksheets(2).Select
ROW1 = Worksheets(2).Cells(Rows.Count, "A").End(xlUp).Row
Cells.ClearFormats
Sheets(1).Select
For I = 1 To ROW1
f1 = Worksheets(2).Cells(I, "A").Value
Range("B1").Select
On Error Resume Next '©¿²¤¿ù»~Ä~Äò°õ¦æ VBA ¥N½X,Á×§K¥X²{¿ù»~«H®§
'·j´M¦r¦ê========================================================================
Cells.Find(What:=f1, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, MatchByte:=False, SearchFormat:=False).Activate
Worksheets(2).Cells(I, "B").Value = ActiveCell.Value
If Worksheets(2).Cells(I, "B").Value = "" Then
Worksheets(2).Range("A" & I).Interior.Color = RGB(128, 0, 128)
End If
Next
Sheets(2).Select
Range("B1:B" & ROW1).ClearContents
Application.ScreenUpdating = True
End Sub |
-
-
test.zip
(19.76 KB)
|