VLookup with Quantity Comparison

MrJerry

New Member
Joined
May 23, 2011
Messages
2
I need your help on a vlookup function. I have two worksheets with two similar sets of data. I finished the vlookup to make sure one set of data includes all order numbers in the other set. I need to take it one step further. I need to check that a order quantity on one sheet matches the order quantity on another sheet for the same order number. How do I do that?
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
I need your help on a vlookup function. I have two worksheets with two similar sets of data. I finished the vlookup to make sure one set of data includes all order numbers in the other set. I need to take it one step further. I need to check that a order quantity on one sheet matches the order quantity on another sheet for the same order number. How do I do that?

On Sheet1 with A2 housing an order number...

=B2=INDEX(Sheet2!$C$2:$C200,MATCH(A2,Sheet2!$A$2:$A$200,0))

This compares the amount in B2 with the amount Index/Match finds on Sheet2 in C2:C200.
 
Upvote 0
Thank you so much!!! It worked great!! Could you please talk through the formula so I can explain it? Thank you!!:)
 
Upvote 0
Thank you so much!!! It worked great!!

You are welcome.

Could you please talk through the formula so I can explain it? Thank you!!:)

A] MATCH determines the position of a look up value in a reference.

B] INDEX returns a result value at the same position as the look up value from an associated reference.

Example. Consider E2:F4 below...

FAD,18
KAD,80
LAD,25

Goal: Get the value from B2:B4 that corresponds to KAD in A2:A4.

INDEX(F2:F4,MATCH("KAD",E2:E4,0))

would achieve the goal... Looked closely at this formula, we have:

MATCH("KAD",E2:E4,0)

==> 2

INDEX(F2:F4,2)

==> 80

We can compare the result of such formula with an existing value...

Let J2 house 45. If we try, for example in K2:

=J2=INDEX(F2:F4,MATCH("KAD",E2:E4,0))

we would get FALSE for 45 is not equal to 80 which Index/Match returns.

Hope this helps.
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,841
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top