Compare a table cell value to see if it matches a value from multiple values from another table

gberg

Board Regular
Joined
Jul 16, 2014
Messages
186
Office Version
  1. 365
Platform
  1. Windows
I have two tables:
- The first table lists Items and the values that are acceptable for the "UOM" (Unit of Measure)
- The second table lists Items and has associated quantities with their UOM

I want a formula to verify that the UOM used in the second table is one that is listed in the first table and returns "UOM Correct" if it is or "UOM Incorrect" if it is not

In this example the second table Item 1 is incorrect because "EA" is not one of the values for Item 1 from the fist table. Item 2 is correct because "BUND" is one of the values from the first table.
ItemUOM 1UOM 2UOM 3
Item 1SHSFBUND
Item 2EALFBUND
ITEMQTYQTY UOMQTY UOM ERROR
Item 1100EAUOM Incorrect
Item 2100BUNDUOM Correct

Thanks for your help
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Is this what you are after?

23 02 28.xlsm
ABCD
1ItemUOM 1UOM 2UOM 3
2Item 1SHSFBUND
3Item 2EALFBUND
4
5
6ITEMQTYQTY UOMQTY UOM ERROR
7Item 1100EAUOM Incorrect
8Item 2100BUNDUOM Correct
gberg
Cell Formulas
RangeFormula
D7:D8D7="UOM "&IF(ISNUMBER(MATCH(C7,INDEX(B$2:D$3,MATCH(A7,A$2:A$3,0),0),0)),"Correct","Incorrect")
 
Upvote 0
Solution
Peter,
You've helped me in the past and as always you make it look easy! That did exactly what I needed. Thank you for your help, again!

Greg
 
Upvote 0

Forum statistics

Threads
1,215,839
Messages
6,127,191
Members
449,368
Latest member
JayHo

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