IF, AND & OR Checking Multiple Value Combinations in Multiple Cells

Denny57

Board Regular
Joined
Nov 23, 2015
Messages
185
Office Version
  1. 365
Platform
  1. Windows
Using IF, AND & OR, I have managed to obtain TRUE & FALSE returns for 3 Cells where each has 2 possible values. There are 8 possible different Combinations and if any of these are TRUE the value of cell AF21 is returned but if FALSE then "0" is returned.

EXAMPLE
=IF(OR(AND($B$5="EW",D19="W",E19="W",F19="P"),AND($B$5="EW",D19="W",E19="W",F19="W"),AND($B$5="EW",D19="W",E19="P",F19="W"),AND($B$5="EW",D19="W",E19="P",F19="P"),AND($B$5="EW",D19="P",E19="P",F19="P"),AND($B$5="EW",D19="P",E19="P",F19="W"),AND($B$5="EW",D19="P",E19="W",F19="P"),AND($B$5="EW",D19="P",E19="W",F19="W")),AF21,0)
The cells are D19,E19 & F19 and Possible Values are "W" & "P"

I am looking to expand this for 5 Cells each with 2 possible values which will return 32 possible combinations.

Is there a valid syntax that will shorten the formula, perhaps by identifying each cell and each possible value. Each possible combination will return TRUE.

I welcome any possible resolutions
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Forum statistics

Threads
1,214,833
Messages
6,121,857
Members
449,051
Latest member
excelquestion515

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