=CONCATENATE(MID(A3,FIND(" ::",A3)+3,LEN(A3)-8-FIND(" ::",A3)-5),RIGHT(A6,LEN(A6)-8))
vba中的语法是什么?如果有人指出我正确的方向,将不胜感激。
答案 0 :(得分:1)
双引号加倍:
Sub Sarah()
MsgBox Evaluate("CONCATENATE(MID(A3,FIND("" ::"",A3)+3,LEN(A3)-8-FIND("" ::"",A3)-5),RIGHT(A6,LEN(A6)-8))")
End Sub
答案 1 :(得分:0)
我可能会这样做,但加里学生的答案也应该有效。
Sub StackTest()
Dim Result As String
Dim Yoursheet As Worksheet
Dim FirstString As String
Dim SecondString As String
'yoursheet = **enter your worksheet here, then uncomment the line**
FirstString = Yoursheet.Range("A3").Text
SecondString = Yoursheet.Range("A6").Text
Result = Mid(FirstString, InStr(FirstString, " ::") + 3, Len(FirstString) - 8 - _
InStr(FirstString, " ::") - 5) & Right(SecondString, Len(SecondString) - 8)
End Sub