I'd like to write a loop script to take out:
-IC
-MR
-(Spaces)
Function Data_Strip(txName As String)
Data_Strip = Replace(Replace(Replace(txName, "(IC)", "", 1), "Mr. ", "", 1), " ", "", 1)
End Function
I'd like to write a loop script to take out:
-IC
-MR
-(Spaces)
Function Data_Strip(txName As String)
Data_Strip = Replace(Replace(Replace(txName, "(IC)", "", 1), "Mr. ", "", 1), " ", "", 1)
End Function
Well, I am confused, because it looks like the title of your post indicates that you want to replace values, but the body of your post looks like you want to just clear out the values. But nobody's answered you, so here is the formula I do to loop a find and replace with multiple finds and multiple replacements, as well as the formula I use to find and clear. This code is for Excel 2007. You may or may not have to tweak it for 2010. But at least it's somewhere to start. I used Column B in the first worksheet, for my example code. You'll have to set your own worksheet and range. I used brackets to indicate where you should place your own replacement values at. Delete the brackets, when you type your own values in there.
Code if you're trying to Find and Replace
![]()
Please Login or Register to view this content.
Code to Find and Clear Contents of Cell
![]()
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks