ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   matching ids help (https://www.excelbanter.com/excel-discussion-misc-queries/215933-matching-ids-help.html)

rodchar

matching ids help
 
hi all,
i have 2 worksheets

S1
------
id, name
1, john
2, cathy

S2
------
id, type
1, email
2, phone

Is there a way to add the person's name in the column next to appropriate
type of the 2nd spreadsheet, linked by id?

Desired result:
1,email,john
2,phone,cathy

thanks,
rodchar


Bob Phillips[_3_]

matching ids help
 
How about a simple formula

C2: =INDEX('S1'!B:B,MATCH(A2,'S1'!A:A,0))

--
__________________________________
HTH

Bob

"rodchar" wrote in message
...
hi all,
i have 2 worksheets

S1
------
id, name
1, john
2, cathy

S2
------
id, type
1, email
2, phone

Is there a way to add the person's name in the column next to appropriate
type of the 2nd spreadsheet, linked by id?

Desired result:
1,email,john
2,phone,cathy

thanks,
rodchar




JBeaucaire[_72_]

matching ids help
 

rodchar;175644 Wrote:
S1
------
id, name
1, john
2, cathy

S2
------
id, type
1, email
2, phone

Desired result:
1,email,john
2,phone,cathy


Assume that is row 2 with id 1. In C2, put this formula:

=VLOOKUP(A2,Sheet1!$A$2:$B$100,2,FALSE)

Copy that down to do the remaining rows.


--
JBeaucaire
------------------------------------------------------------------------
JBeaucaire's Profile: http://www.thecodecage.com/forumz/member.php?userid=73
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=48587


rodchar

matching ids help
 
thanks for the help,
rod.

"rodchar" wrote:

hi all,
i have 2 worksheets

S1
------
id, name
1, john
2, cathy

S2
------
id, type
1, email
2, phone

Is there a way to add the person's name in the column next to appropriate
type of the 2nd spreadsheet, linked by id?

Desired result:
1,email,john
2,phone,cathy

thanks,
rodchar



All times are GMT +1. The time now is 11:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com