°²³]¸ê®Æ¬°
.cells.find§ä¨ì§å¸¹¬°ABCDªº¦ì¸m¡A
¨Ã§R°£¬ÛÃö¸ê®Æ(¦p¹Ï¤ù2~14¦C)
¤p§Ìªºµ{¦¡½X¦p¤U¡A¦ý¬O·|µo¥Í¿ù»~¡A½Ð°Ý«ç»òקï©O¡H·PÁ¡I¡I
With UserForm1
If ¸ê®Æ§å¸¹.Value = "" Then
MsgBox "½Ð¥ý¬d¸ß¸ê®Æ", vbCritical + vbOKOnly, ""
Else
Set §R°£¸ê®Æ = Sheet1.Cells.Find(What:=§å¸¹, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=True)
With Sheet1
For i = -1 To 201
§R°£¸ê®Æ.Offset(-10, i).Delete
§R°£¸ê®Æ.Offset(-9, i).Delete
§R°£¸ê®Æ.Offset(-8, i).Delete
§R°£¸ê®Æ.Offset(-7, i).Delete
§R°£¸ê®Æ.Offset(-6, i).Delete
§R°£¸ê®Æ.Offset(-5, i).Delete
§R°£¸ê®Æ.Offset(-4, i).Delete
§R°£¸ê®Æ.Offset(-3, i).Delete
§R°£¸ê®Æ.Offset(-2, i).Delete
§R°£¸ê®Æ.Offset(-1, i).Delete
§R°£¸ê®Æ.Offset(0, i).Delete
§R°£¸ê®Æ.Offset(1, i)Delete
§R°£¸ê®Æ.Offset(2, i).Delete
Next
End With
End If
End With |