how to find and replace

jkpd2000

Board Regular
Joined
May 8, 2002
Messages
91
hi ,

i have two columns
i want to find a value in one column and put a value in the second column. like that for enitre worksheet

thx
 
i am going to assume that you have only two columns. start with the first cell in the first column selected, then:

do until activecell.value = ""
if activecell.value = variable1 then
activecell.offset(0,1).select
activecell.value = variable2
activecell.offset(1,-1).select
else
activecell.offset(1,0).select
end if
loop

of course variable1 and variable2 can change depending on what you are looking for from the source worksheet and what you are going to enter into the target.
hope this helps.
al
 
Upvote 0

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Forum statistics

Threads
1,215,206
Messages
6,123,639
Members
449,111
Latest member
ghennedy

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