Originally Posted by
anandbohra
hi
try this one & i dont think that this requires any loop
[vba]Sub findLiquid_selection()
Selection.Replace What:="SL det(conc)-MaxKleen 9", Replacement:="MaxKleen 9", _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:= _
False, ReplaceFormat:=False
Selection.Replace What:="SL det(liq)-Dynamo", Replacement:="Dynamo", LookAt:= _
xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub
[/vba]
the above code work only on your selected data area if u want to run on activesheet use this
[vba]Sub findLiquid_activesheet()
cells.Replace What:="SL det(conc)-MaxKleen 9", Replacement:="MaxKleen 9", _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:= _
False, ReplaceFormat:=False
cells.Replace What:="SL det(liq)-Dynamo", Replacement:="Dynamo", LookAt:= _
xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub
[/vba]
the above code is tested in 2003