View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Sean Timmons Sean Timmons is offline
external usenet poster
 
Posts: 1,696
Default how 2 merge 2 tables (worksheets)

=INDEX(TABLE YOU ARE REFERENCING,MATCH(THE ID # FROM CURRENT TABLE,THE COLUMN
IN REFERENCED TABLE THAT HOLDS THE ID #),MATCH(THE COLUMN HEADER YOU WANT,THE
ROW IN REFERENCED TABLE THAT HAS YOUR COLUMN HEADERS))

So, if the first table you listed is on Sheet 1, in A1:C3 and your result
table is on Sheet2, say, A1:E4, where e-mail address is column E:

=INDEX(Sheet1!$A$1:$C$3,MATCH($A2,Sheet1!$A$1:$A$3 ),MATCH(E$1,Sheet1!$A$1:$C$1))

returns the e-mail address. Absolute values have been set to allow you to
copy this formula all the way down and to the right.

"adam" wrote:

if i have a table/sheet like this:

id# first last address
1 bob a ny
2 ron s la
3 dan r ca

and a different one:
id# email phone
1 212
3
718

is it posible to merege so where ever Id# sheet1 = Id# sheet 2 it will auto
add in that row the cells with the data?

example of final result i need:
id# first last address email phone
1 bob a ny
212
2 ron s la
3 dan r ca
718