Sub DeleteWords()
Dim Word As Variant
Const WordList = "One,Two,Three,Four,Five,etc."
For Each Word In Split(WordList, ",")
Cells.Replace Trim(Word), "", xlWhole
Next
End Sub
The more common usage of Split is to create an array and assign it to a dynamic array variable that can be used later on in your program. For example...so THAT'S how you use Split? that's awesome. Def be using that in the future.
Dim X As Long, MyArray() As String
....
....
MyArray = Split("One,Two,Three,Four", ",")
....
....
' Let's see what's in MyArray
For X = 0 To UBound(MyArray)
MsgBox MyArray(X)
Next
Give this macro a try where I have assumed the words you want to replace fill up the cells they are in (that is, no other text is in the cell with them)...
Simply replace my sample list of words in the WordList constant (the Const statement) with your own words.Code:Sub DeleteWords() Dim Word As Variant Const WordList = "One,Two,Three,Four,Five,etc." For Each Word In Split(WordList, ",") Cells.Replace Trim(Word), "", xlWhole Next End Sub