Match columns and bring back a third column

Closed
Alex - May 19, 2010 at 10:23 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - May 20, 2010 at 11:06 AM
Hi excel gurus,

I have a problem and I need some help to match information in two spreadsheets,

I need to match the first two colomns in sheet1 with the first two columns of sheet2, if they are an exact match then bring back the third column C of sheet2 in column D of sheet1.

Please help

Alex


Example

Sheet1
A B C
10 20 XYZ
10 21 rer
11 22 YCD
11 23 tye
12 24 RER
13 25 YTR


Sheet2
A B C
10 20 ffdfd
10 21 erere
11 22 $£4
11 23 eet
12 24 rere
13 25 rerere

Answer Sheet1
A B C D
10 20 XYZ ffdfd
10 21 rer erere
11 22 YCD $£4
11 23 tye eet
12 24 RER rere
13 25 YTR rerere




2 responses

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
May 19, 2010 at 04:45 PM
Can you add a new column in Sheet2 which shows the cosolidated value of column A and B ? Some thing like

=A2 & "|" & B2 ?
0
Hi Rizvisa1

Thanks for your help but unfortunately this is not the solution to my query.. I want to compare columns a&b in sheet1 with columns a&b in sheet2 and if they are the same bring back the data from column c in sheet2 into column d in sheet1.

Do you have a solution for this query.

Alex
0
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
May 20, 2010 at 05:15 AM
that was to provide with a solution. It is not a solution, it was to set up a solution. so again is it possible to have such column on sheet2
0
Hi Rizvisa1,

My apologies I picked you up wrong. I have setup your formula in column of sheet2.

Alex
0
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
May 20, 2010 at 11:06 AM
If you have added that column after the column C on sheet2, then you can use

=IF(ISERROR(MATCH(A2 & "|" & B2, Sheet2!D:D,0)), "", INDIRECT("Sheet2!C" & MATCH(A2 & "|" & B2, Sheet2!D:D,0)))
This assumes that you have added the formula in D column of sheet2

You could also use VLOOKUP but for that, the condition is that newly added column appear before the value that is be to returned, (so inyou sample the column C needs to be moved one column to right ( to column d)

Again assumption is that you have used formula A2 & "|" & b2
0