Replace data using a macro in Excel 2000

tglancy

New Member
Joined
Sep 12, 2002
Messages
10
In fields a1 and a2 I have two aplhanumeric values , call them "d0409" and
"d1309".

I simply need to use these values (although they change each week) as input to a replace but within a macro. For example

Find :- d2808
Replace with :- d0409 (Value of Cell a1).

Remember , the a1 and A2 values are not constants.Can this be done ? Thanks , I'm sure this question will take some of you no time at all ! I'm a new user.
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
without a macro:
use edit find. in the replace box, write: =a1
change all
you may wish to convert the formulas to values. do it by copy the range and paste special, values
thanks
 
Upvote 0
Selection.Replace What:="rrr", Replacement:="=a1", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
 
Upvote 0

Forum statistics

Threads
1,214,822
Messages
6,121,765
Members
449,049
Latest member
greyangel23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top