Updating one worksheet from another

routrax

New Member
Joined
May 18, 2006
Messages
5
Hi Guys n Gals,

I'd like to compare 2 spreadsheets and if 2 cells in a row on spreadsheet a match 2 cells in a row on spreadsheet b the a value from a certain cell in b is copied in to a.

i hope this makes sense!

Cheers
Routrax
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
What you ask is possible. but you should tell us more precisely what and how you want it done.
The code below runs for 100 rows, compares corresponding cells of sheet 1 to sheet 2 and if 2 or more cells match it copies the value in G column of sheet 2 to K column of sheet 1.

for a = 1 to 100
if cells(a,1) = worksheets("sheet2").cells(a,1)
b = b + 1
if b > = 2 then
cells(a,11) = worksheets("sheet2").cells(a,7)
endif
endif
next a

you have to change the cell numbers to suit your needs

Ravi
 
Upvote 0

Forum statistics

Threads
1,215,008
Messages
6,122,672
Members
449,091
Latest member
peppernaut

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