我正在尝试在 vba 中提取字符串的最后两个单词。
有人可以帮我解决这个问题吗?
非常感谢!
最佳答案
考虑:
Sub LastTwoWords()
Dim s As String
s = "Now is the time for all good men to come to the aid of the party"
ary = Split(s, " ")
MsgBox ary(UBound(ary) - 1)
MsgBox ary(UBound(ary))
End Sub
关于excel - 在VBA中提取字符串的最后两个单词,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37617429/