vba - remove data after aprticular key word from excel cells -
I like Some data in my Excel cells
"35 xxxxxx, yyyy, zzzzz 1AA call 01234 567 899 01234 567 899 end_of_the_skype_highlighting free agents ideally bla bla bla bla in bla center xxxxxxxxxxxxx_highlighting, they ... and " I followed all data Call 01234 567899 . Here the number is not fixed How can I delete all the data in the phone number exchange in every cell? Thanks Narsapa You may have to rely on regular expression library or write a function, which is to find calls uses Instrr, above everything connects in a temporary string, then repeats the series of numbers later, once you read those lines - using central function on the original string from that point, essentially Leaving sub, "call" string It can be cumbersome, and this may be the possibility of errors To use my recommendation Regex, the following should work as:.
sString = "35 xxxxxx, yyyy, zzzzz 1AA call 01234 567 899 01234 567 899 end_of_the_skype_highlighting free agents Ideally bla bla bla bla bla, they ... and" set regex = CreateObject ( " VBScript.RegExp ") regEx.Pattern =" Call \ s located in the \ center xxxxxxxxxxxxx_highlighting D + \ s \ d + "msgbox regEx.Replace (sString," ") < / Html>
Comments
Post a Comment