Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

how to write "if include" within index/match lookup

Status
Not open for further replies.

RE776

Specifier/Regulator
Feb 17, 2011
16
0
0
GB
Anybody may be able to help?

I have a table which consist of 5 columns with headings and about 12 rows of data

1.) References
2.) Group
3.) Type
4.) Class
5.) Product

I have 6 rows of data which also consists of Group, Type, Class and Reference.

I want to find out what product each row represent based on the unique combinations of group, type, class and reference from the table.

The challenge I have is, the references from the table, consist of 9 different references in one cell.

I want to write a formula to search for a specific reference within the cell. I have tried to use the formula below but without much luck.

=INDEX($A$2:$E$13,MATCH(1,($B$2:$B$13=$H18)*($C$2:$C$13=$I18)*($D$2:$D$13=$J18)*($A$2:$A$13="*"&$K18&"*"),0),5)

Can any body help please?

Many thanks in advance

Felix
 
 http://files.engineering.com/getfile.aspx?folder=bf89b2f9-372e-4781-a17c-bc44d72d9c45&file=Example.xlsx
Replies continue below

Recommended for you

hi,

This is a bit obtuse, because it depends on a ROW NUMBER, which can change as you move your lookup table.

1) Make your Lookup Table a Structured Table named tLookup.

2) The formula:
[tt]
=INDEX(tLookup[Product],SUMPRODUCT((tLookup[Group]=H19)*(tLookup[Type]=I19)*(tLookup[Class]=J19)*(IF(IFERROR(FIND(K19,tLookup[Reference]),FALSE)>0,TRUE,FALSE))*ROW(tLookup[Reference]))-1,1)
[/tt]

The SUMPRODUCT() function (or SUMIFS(), but I prefer the former) allows for multiple criteria.

The -1 adjusts for the row position of your table.

Wrap the entire formula in IFERROR() to handle the "unknown" case.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Status
Not open for further replies.
Back
Top