且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Excel VBA - 删除字符串内容最多*字*

更新时间:2023-10-13 08:15:04

你去:

Dim s As String
s = "Emily has wild flowers. They are red and blue."

Dim indexOfThey As Integer

indexOfThey = InStr(1, s, "They")


Dim finalString As String
finalString = Right(s, Len(s) - indexOfThey + 1)