ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Find and replace (https://www.excelbanter.com/excel-discussion-misc-queries/61470-find-replace.html)

Brisbane Rob

Find and replace
 

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


Niek Otten

Find and replace
 
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"
wrote in message
news:Brisbane.Rob.20epay_1135196101.7246@excelforu m-nospam.com...

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




Don Guillett

Find and replace
 
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

"Brisbane Rob"
wrote in message
news:Brisbane.Rob.20epay_1135196101.7246@excelforu m-nospam.com...

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




Brisbane Rob

Find and replace
 

Thanks, Neik, your help much appreciated


--
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


Brisbane Rob

Find and replace
 

Thanks Don!

Much appreciated


--
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



All times are GMT +1. The time now is 08:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com