Forum Discussion
Macros Help Please! I need to delete one word in a cell
Hi Jan
I am grateful for your suggestion but it didn't work :-(
I have been trying to use a 'find and replace' type solution within the macro.
Sub itemReplace()
'
' RemoveWordItem Macro
' Remove the words 'item' and 'items' from column B so that only the number remains.
'Variable created which is good practice but not necessary the key here is the wild card *.
Dim itemReplace As String
itemReplace = "item*"
' You can choose however many columns you want from a to zz if you so desire.
Columns("B:B").Select
'itemReplace in the following line is a variable create from the text above.
Selection.Replace What:=itemReplace, Replacement:=" ", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
'
End Sub
this isn't working either!
Any ideas?