Check for Presence of a Value in a Column Based on a List

dwgnome

Active Member
Joined
Dec 18, 2005
Messages
441
In a separate column I would like to answer "Yes" or "No" if there is a value greater than zero somewhere in the same row if that number falls under the column header that matches a predefined list. It can be more than one number meeting this criteria, but it has to be at least one in the row.

Unit No
SOP
apple
pear
oranges
nuts
banana
45
Yes
3
9
5
7
88
Yes
2
8
1
12
No
7
Yes
3

<tbody>
</tbody>


Predefined List

Nuts
Pear
Banana

Also is it possible to have the formula allow for expanding predefined list.

Thank you.
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
In a separate column I would like to answer "Yes" or "No" if there is a value greater than zero somewhere in the same row if that number falls under the column header that matches a predefined list. It can be more than one number meeting this criteria, but it has to be at least one in the row.

Unit No
SOP
apple
pear
oranges
nuts
banana
45
Yes
3
9
5
7
88
Yes
2
8
1
12
No
7
Yes
3

<tbody>
</tbody>


Predefined List

Nuts
Pear
Banana

Also is it possible to have the formula allow for expanding predefined list.

Thank you.

The banana entry in the first row has a trailing space. Such needs to be avoided.

A1:G5 houses the relevant data...

B2, control+shift+enter, not just enter, and copy down:
Rich (BB code):
=IF(ISNUMBER(LOOKUP(9.99999999999999E+307,
  MATCH(IF($C2:$G2,$C$1:$G$1),List,0))),"Yes","No")
where List refers to a range housing the predefined list. This list can be extended at will. If so desired, it can be defined as a dynamic named range. Let A2:A4 on a sheet called Admin house the current list and define List as referring to:
Rich (BB code):
=Admin!$A$2:INDEX(Admin!$A:$A,MATCH(REPT("z",255),Admin!$A:$A))
 
Upvote 0

Forum statistics

Threads
1,213,535
Messages
6,114,194
Members
448,554
Latest member
Gleisner2

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