SOLVED

Comparing a cell value against a table

Copper Contributor

Hi, I'm looking for 2 formulas to compare a value against a table in excel to return 1) a match and 2) another value.

Below is an example of the excel table.

What should be the input formulas in the yellow highlighted field for expected result?

Thanks.

gab2020_0-1594200386116.png

 

4 Replies
best response confirmed by gab2020 (Copper Contributor)
Solution

@gab2020 

If the layout of the data is similar to as per the screenshot below...

 

CheckValueInTable.jpg

You may try these formulas to get the desired outputs...

 

In B8

 

=IF(COUNTIF(C2:H5,A8),"True","False")

 

 

In B9

 

=INDEX(B2:B5,AGGREGATE(15,6,1/(C2:H5=A9)*(ROW(C2:H5)-ROW(C2)+1),1))

 

 

Please refer to the attached for more details.

 

Thanks @Subodh_Tiwari_sktneer for the details.

 

Noted @Sergei Baklan.

:)

You're welcome @gab2020!

1 best response

Accepted Solutions
best response confirmed by gab2020 (Copper Contributor)
Solution

@gab2020 

If the layout of the data is similar to as per the screenshot below...

 

CheckValueInTable.jpg

You may try these formulas to get the desired outputs...

 

In B8

 

=IF(COUNTIF(C2:H5,A8),"True","False")

 

 

In B9

 

=INDEX(B2:B5,AGGREGATE(15,6,1/(C2:H5=A9)*(ROW(C2:H5)-ROW(C2)+1),1))

 

 

Please refer to the attached for more details.

 

View solution in original post