Set c = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious)
Do While Not c Is Nothing
If Trim(c.Value) = "" Then
c.ClearContents '看你要不要清除掉該空白字元
Set c = Cells.FindPrevious(c)
Else
lastRow = c.Row
Exit Do
End If
Loop作者: loquat 時間: 2013-2-21 19:37
初学VBA,写的东西供您参考
Sub Example()
Application.ScreenUpdating = False
Application.EnableEvents = False
Dim r As Range, i As Integer, j As Integer, temp As Integer