View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
broro183
 
Posts: n/a
Default unifying two sheets by a common index column


Hi Yaron,

Yes, this can be done using a vlookup function eg:

=VLOOKUP('Initial Sheet'!$A1,'Other Sheet'!$A:$G,COLUMN('Initial
Sheet'!G1)-5,FALSE)

Copy this into the first empty column (cell G1 of "Initial Sheet" in my
example) of one of your two sheets & paste across for as many columns as
there are columns in the "Other Sheet" (cols A to G in my example) &
down as many rows as needed.

This part of the formula, "COLUMN('Initial Sheet'!G1)-5", means that
you don't have to change the formula to lookup a new column when you
copy it across the columns of the Initial Sheet.
If the data in your initial sheet goes to a different column, change
the "5" to another number so that the result is of this is 2 in your
first column.

This is based on the assumption that your "index column" is in column A
of both sheets.
Once all the data has been transferred into the Initial Sheet I would
select all the vlookup equations and copy & paste special as values
because a lot of vlookups can slow the spreadsheet down lots & I'm
guessing that once you have all the values in one sheet, the other one
won't be needed?

hth
Rob Brockett
NZ
Always learning & the best way to learn is to experience...


--
broro183
------------------------------------------------------------------------
broro183's Profile: http://www.excelforum.com/member.php...o&userid=30068
View this thread: http://www.excelforum.com/showthread...hreadid=528932