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

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Forum statistics

Threads
1,214,411
Messages
6,119,360
Members
448,888
Latest member
Arle8907

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