JustTryingToFigureItOut
New Member
- Joined
- Mar 27, 2013
- Messages
- 5
I used the macro recorder to replace certain text in the range A3:A5000 (in this case [M]) with the text in cell A2 (in this case "khols"). I want to be able to run the same thing for all columns in the spreadsheet, but replace B3:B5000 with text in B2, C3:C5000 with text in C3, etc.
The code I'm using is:
Sub MerchantReplaceTest1()
'
' MerchantReplaceTest1 Macro
'
'
ActiveCell.Range("A3:A5000").Select
Selection.Replace What:="[M]", Replacement:="khols", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub
How do I edit this to be able to run for all columns in the sheet?
The code I'm using is:
Sub MerchantReplaceTest1()
'
' MerchantReplaceTest1 Macro
'
'
ActiveCell.Range("A3:A5000").Select
Selection.Replace What:="[M]", Replacement:="khols", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub
How do I edit this to be able to run for all columns in the sheet?