Lookup challenge, which of the 6 values is found in a different single column

scottlarock

Board Regular
Joined
Apr 10, 2009
Messages
102
Hi everyone,

I have 6 columns, side by side, with a product family in each, and this data is listed down a range of rows.
I need to see if one of the 6 possible product families alongside each row is found within a different single column on another sheet (there may be more than one TRUE statements but returning the first matching product Family is sufficient in that case).

I was able to manage this but I had to break the formula down into 7 parts, which weighs a ton in my already very heavy workbook.

Basically I added helper columns (from H to M) where each column represents 1 of the 6 possible product families (from A6:A10000 to F6:F10000), in order to return a TRUE if one of the product families was found in the different single column

Formula in H6=IF(ISERROR(MATCH(A6,All_Product_Families,0)),FALSE,TRUE))
Formula in I6=IF(ISERROR(MATCH(B6,All_Product_Families,0)),FALSE,TRUE))
Formula in J6=IF(ISERROR(MATCH(C6,All_Product_Families,0)),FALSE,TRUE))
Formula in K6=IF(ISERROR(MATCH(D6,All_Product_Families,0)),FALSE,TRUE))
Formula in L6=IF(ISERROR(MATCH(E6,All_Product_Families,0)),FALSE,TRUE))
Formula in M6=IF(ISERROR(MATCH(F6,All_Product_Families,0)),FALSE,TRUE))

And then I add the 7th helper column to return the product family number listed in H1:M1 (result would be from 1 to 6), where A1=H1=1; B1=I1=2; C1=J1=3; D1=K1=4; E1=L1=5; F1=M1=6

Formula in G6=INDEX($H$1:$M$1,MATCH(TRUE,H6:M6,0))

This adds 6 significant lookups + the 7th easy lookup... but I NEED to simplify this into a single lookup otherwise nobody will be able to use this file as it is too darn heavy...

Tons of thanks in advance for your strong support !
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
This example counts the matches in a row to another range, it's even easier if only the headers vary and not the records:


Excel 2010
ABCDEFGHIJ
1NameName1Name2Name3Name4Name5EEEEE
2AAAAAAAAAAAAAAAAAAAAA0BBBBBB
3BBBBBBBBBBBBBBBBBBBBB1FFFFFF
4CCCCCCCCCCCCCCCCCCCCC0
5DDDDDDDDDDDDDDDDDDDDD0
6EEEEEEEEEEEEEEEEEEEEE1
7FFFFFFFFFFFFFFFFFFFFF1
8GGGGGGGGGGGGGGGGGGGGG0
Sheet2
Cell Formulas
RangeFormula
G2{=SUM(COUNTIF($A2:$F2,$J$1:$J$3))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Thank you very much, yet what I need is for the formula to return either the 1st matching product family name itself, or the product fam number (1 to 6).
 
Upvote 0
Try this "array formula"

=INDEX($H$1:$M$1,MATCH(TRUE,ISNUMBER(MATCH(A6:F6,All_Product_Families,0)),0))

confirmed with CTRL+SHIFT+ENTER

although if the values in H1:M1 are always 1,2,3,4,5 and 6 the MATCH alone would be sufficient, i.e.

=MATCH(TRUE,ISNUMBER(MATCH(A6:F6,All_Product_Families,0)),0)
 
Upvote 0
Amazing !
Thank you so much Barry !!
I used the Match only formula, it is perfectissimo :°)) I guess it is the lightest and works like a charm too.
Have a great Sunday !
 
Upvote 0

Forum statistics

Threads
1,223,275
Messages
6,171,119
Members
452,381
Latest member
Nova88

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