Copy/Paste into Find/Replace using Macros

rumbea03

New Member
Joined
Jul 14, 2005
Messages
5
Does anybody know if it is possible to Copy/Paste into Find/Replace and then Replace All with Macros?

For example:

A1 = "x"
A2 = "y"
B1 to B100 all = "y"

Is there a Macro I can run to find the all values equaling the value in A2 and replacing with the value in A1?

At the end B1 to B100 all = "x".

Thanks!
 

Some videos you may like

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

acw

MrExcel MVP
Joined
Feb 13, 2004
Messages
4,814
HI

How about

range("B1:B100").replace what:=range("A2").value, replacement:=range("A1").value


Tony
 

Watch MrExcel Video

Forum statistics

Threads
1,112,797
Messages
5,542,558
Members
410,560
Latest member
1ndependent
Top