VBA使用string和整数search与

好吧,所以我正在寻找一种在Cells.Find代码中使用string的方法。 该代码将search我放入的文本,而不是作业&“〜”,但我需要它来寻找这个。 谢谢

Dim Job As String Dim Up As Integer Job = Range("C3").Value For x = 0 To 10 Up = x + 1 'This is where I am having problems with searching for the String and Integer. Cells.Find(What:= Job & "~" & up, After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False).Activate Next x 

尝试添加额外的代字号:

 Cells.Find(What:= Job & "~~" & Up, After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False).Activate 

Excel 使用代字符~作为转义字符 。