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

Denny57

New Member
Joined
Nov 23, 2015
Messages
49
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

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Watch MrExcel Video

Forum statistics

Threads
1,130,054
Messages
5,639,796
Members
417,114
Latest member
JPFaulkner

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
Top