Sub max()
Sheets(1).Select
Sheets(1).Name = "Sheet1"
Dim rng As Range
Dim celladdress As String
Dim celling As Variant
Do Until IsEmpty(celling)
If celling > "G4" Then
Set rng = Range("G3:G1000").Find(what:="Description")
rng.Find what:="Description"
celladdress = rng.Address(-1)
celling = celladdress
Else: Call Source
End If
Loop
MsgBox "done"
End Sub
嗨我试图在我的范围内找到单词描述,如果描述是 foudn 那么它应该运行宏然后循环。但如果变量为空且未找到变量描述,我希望循环结束并显示 msgbox。我试图使用循环结束循环,直到单元格为空,但它似乎不起作用。变量 celling 引用为空,所以我不确定为什么这不起作用。任何帮助将不胜感激,感谢max