PDA

View Full Version : problem replacing string by another one



mehdoush
07-05-2009, 04:57 AM
hey guys ;)

how can i in a sheet find string "FAB002" and whenever i find it i should replace it with "125389_00" string.

thnks in advance
regards

Bob Phillips
07-05-2009, 05:05 AM
Find and Replace, Ctrl-H

mehdoush
07-05-2009, 05:16 AM
i know this xld but i want to integate it in a macro u c ?

p45cal
07-05-2009, 07:10 AM
Activesheet.Cells.Replace What:="FAB002", Replacement:="125389_00", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False

Bob Phillips
07-05-2009, 07:17 AM
i know this xld but i want to integate it in a macro u c ?

Then do it in Excel with the macro recorder on. This will create the code and show you a technique.

mehdoush
07-05-2009, 07:48 AM
thank you guys ;)