ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Comparing Cells (https://www.excelbanter.com/excel-worksheet-functions/42853-comparing-cells.html)

EXCEL101

Comparing Cells
 
I need to perform the following function:

compare column a in sheet1 with column a in sheet2,
if there is a match then I want to pull the values from sheet 1 column b and
c to
the corresponding row in sheet2.

For instance on sheet1, cell a2 is abcd, b2 is 12345 anc c2 is 54321,
on sheet 2 cell a12 is abcd. So I would like to pull b2 and c2 from sheet 1
to sheet 2 in cells b12 and c12.

Any ideas?

bj

In sheet2 B2
enter
=if(iserror(vlookup(b2,Sheet1!A:C,2,False),"",vloo kup(b2,Sheet1!A:C,2,False)
and in C2
=if(iserror(vlookup(b2,Sheet1!A:C,3,False),"",vloo kup(b2,Sheet1!A:C,3,False)
and copy down as far as you need to.
"EXCEL101" wrote:

I need to perform the following function:

compare column a in sheet1 with column a in sheet2,
if there is a match then I want to pull the values from sheet 1 column b and
c to
the corresponding row in sheet2.

For instance on sheet1, cell a2 is abcd, b2 is 12345 anc c2 is 54321,
on sheet 2 cell a12 is abcd. So I would like to pull b2 and c2 from sheet 1
to sheet 2 in cells b12 and c12.

Any ideas?


EXCEL101

Tried that and am receiving a formula error.

"bj" wrote:

In sheet2 B2
enter
=if(iserror(vlookup(b2,Sheet1!A:C,2,False),"",vloo kup(b2,Sheet1!A:C,2,False)
and in C2
=if(iserror(vlookup(b2,Sheet1!A:C,3,False),"",vloo kup(b2,Sheet1!A:C,3,False)
and copy down as far as you need to.
"EXCEL101" wrote:

I need to perform the following function:

compare column a in sheet1 with column a in sheet2,
if there is a match then I want to pull the values from sheet 1 column b and
c to
the corresponding row in sheet2.

For instance on sheet1, cell a2 is abcd, b2 is 12345 anc c2 is 54321,
on sheet 2 cell a12 is abcd. So I would like to pull b2 and c2 from sheet 1
to sheet 2 in cells b12 and c12.

Any ideas?


Dave Peterson

A small typo (in both formulas):

=if(iserror(vlookup(b2,Sheet1!A:C,2,False)),"",vlo okup(b2,Sheet1!A:C,2,False))



EXCEL101 wrote:

Tried that and am receiving a formula error.

"bj" wrote:

In sheet2 B2
enter
=if(iserror(vlookup(b2,Sheet1!A:C,2,False),"",vloo kup(b2,Sheet1!A:C,2,False)
and in C2
=if(iserror(vlookup(b2,Sheet1!A:C,3,False),"",vloo kup(b2,Sheet1!A:C,3,False)
and copy down as far as you need to.
"EXCEL101" wrote:

I need to perform the following function:

compare column a in sheet1 with column a in sheet2,
if there is a match then I want to pull the values from sheet 1 column b and
c to
the corresponding row in sheet2.

For instance on sheet1, cell a2 is abcd, b2 is 12345 anc c2 is 54321,
on sheet 2 cell a12 is abcd. So I would like to pull b2 and c2 from sheet 1
to sheet 2 in cells b12 and c12.

Any ideas?


--

Dave Peterson


All times are GMT +1. The time now is 07:26 AM.

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