Compare two columns input value from another [Solved/Closed]

blmcamp - May 28, 2010 at 06:34 PM - Latest reply:  Maureen
- Jul 6, 2016 at 11:23 AM
Hello,
Here is what I am trying to do, can some one please help me.

In my Excel Workbook I have 2 spreadsheets.
The first spreadsheet we will call customers. It has 2 columns.
A B
Item Quantity
1 123 54
2 456 75
3 789 89
4 110 43

The second spreadsheet we will call inventory. It has 3 columns.
A B c
Items Inventory
1 110 34534 __43____
2 789 34567 __89____
3 456 76577 __75____
4 123 55454 __54____

What I want the formula to do is this.
I want a formula that will compare the values in column A on spreadsheet 1 to the value in column A on spreadsheet 2 and when the value on sheet 2 equals the value on sheet 1 then the formula will enter the value which is in column b on sheet 1 into column C on sheet 2

IE. On sheet 2 line C4 the value entered would be 54 (sheet 1 A1 =123 and sheet 2 A4=123 so sheet 2 c4=54

If Sheet 1 Column B is Zero the formula would enter 0


Thank you for your help
See more 

2 replies

Best answer
rizvisa1 4481 Posts Thursday January 28, 2010Registration dateContributorStatus January 6, 2016 Last seen - May 28, 2010 at 06:45 PM
1
Thank you
You need to use VLOOKUP on inventory as

=IF(ISERROR(VLOOKUP(A2, customers!A:B,2,false)), "", VLOOKUP(A2, customers!A:B,2,false))

Thank you, rizvisa1 1

Something to say? Add comment

CCM has helped 1257 users this month

This is awesome! I spent hours trying to find a solution for this. Thank-you! Worked like a charm.