我正在尝试删除字符串中包含的某个单词之前的字符串内容。例如
master_of_desaster@live.de
我想使用 VBA 来替换它
master_of_desaster
“单词”(@) 之后的所有内容都应删除,包括“单词”本身。
我发现了类似的主题here ,但他问了相反的问题。
最佳答案
email = "master_of_desaster@live.de"
ret = Left(email, InStr(1, email, "@") - 1)
结果:master_of_desaster
关于vba - Excel VBA - 删除*word*后的字符串内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39593007/