Hi everybody.
I'm kind of new in this forum and in macros.
I need a macro to search and replace a word in a sheet.
I'm using excel 97(I know! but i'm at work and you know the budget problems).
I greatly appreciate any help.
thanks in advance.
Hi everybody.
I'm kind of new in this forum and in macros.
I need a macro to search and replace a word in a sheet.
I'm using excel 97(I know! but i'm at work and you know the budget problems).
I greatly appreciate any help.
thanks in advance.
The easiest way to start is to record a macro of you searching & replacing.
Then if you need any modifications to the macro that you don't know how to do, post your code here and explain what you need to be modified.
Eg: to replace all instances of ALASKA with OHIO:
Sub SearchAndReplace()
Cells.Replace What:="ALASKA", Replacement:="OHIO", LookAt:=xlWhole, _
SearchOrder:=xlByRows, MatchCase:=False
End Sub
Change LookAt:=xlWhole to[/B]LookAt:=xlPart and MatchCase:=False to MatchCase:=True as your circumstances warrant.
HTH
Myles
...constantly looking for the smoother pebble while the whole ocean of truth lies before me.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks