Is it possible to run Find and Replace from a macro where it picks up the 'find' and the 'replace' data from the data in two cells on the sheet?
Any ideas?
Thanks
Is it possible to run Find and Replace from a macro where it picks up the 'find' and the 'replace' data from the data in two cells on the sheet?
Any ideas?
Thanks
Record a macro while doing it manually.
Then edit the macro.
What:=Range("whatever you wanted to replace") becomes What:=Range("a1")
similar for the value to replace it with
--
Kind regards,
Niek Otten
"Brisbane Rob" <[email protected]>
wrote in message
news:[email protected]...
>
> Is it possible to run Find and Replace from a macro where it picks up
> the 'find' and the 'replace' data from the data in two cells on the
> sheet?
>
> Any ideas?
>
> Thanks
>
>
> --
> Brisbane Rob
> ------------------------------------------------------------------------
> Brisbane Rob's Profile:
> http://www.excelforum.com/member.php...o&userid=25096
> View this thread: http://www.excelforum.com/showthread...hreadid=495314
>
something like this
Sub findreplace()
Range("e14:e18").Replace What:="x", Replacement:="y", LookAt:=xlWhole
Range("e16:e18").Replace What:=[e14], Replacement:=[e15], LookAt:=xlWhole
End Sub
--
Don Guillett
SalesAid Software
[email protected]
"Brisbane Rob" <[email protected]>
wrote in message
news:[email protected]...
>
> Is it possible to run Find and Replace from a macro where it picks up
> the 'find' and the 'replace' data from the data in two cells on the
> sheet?
>
> Any ideas?
>
> Thanks
>
>
> --
> Brisbane Rob
> ------------------------------------------------------------------------
> Brisbane Rob's Profile:
> http://www.excelforum.com/member.php...o&userid=25096
> View this thread: http://www.excelforum.com/showthread...hreadid=495314
>
Thanks, Neik, your help much appreciated
Thanks Don!
Much appreciated
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks