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
 

Some videos you may like

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

ravishankar

Well-known Member
Joined
Feb 23, 2006
Messages
3,566
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
 

Watch MrExcel Video

Forum statistics

Threads
1,113,955
Messages
5,545,162
Members
410,667
Latest member
Gaexel
Top