A formula with a lot of conditions..

missmyady

New Member
Joined
Jan 17, 2014
Messages
2
Hi, I need a field (DepField) that depends on seven other fields (Let's say the fields are named 1-7). All fields (including the dependent field can be either "Red", "Yellow" or "Green"

There are different conditions for the dependent field (DepField):

If either field: 1, 3 or 4 = "Red", then DepField = "Red"

if two or more of fields 1-7 = "Red", then DepField = "Red"

If either field: 1, 3 or 4 = "Yellow", then DepField = "Yellow"

if two or more of fields 1-7 = "Yellow", then DepField = "Yellow"

Else DepField = "Green"

Thank you for taking your time.

Best Regards missmyady
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
I have put your range of 'fields 1 to 7' in Range B1:B7, with the below formula in cell B8:
=IF(OR(B1="Red",B3="Red",B4="Red"),"Red",IF(COUNTIF($B$1:$B$7,"Red")>1,"Red",IF(OR(B1="Yellow",B3="Yellow",B4="Yellow"),"Yellow",IF(COUNTIF($B$1:$B$7,"Yellow")>1,"Yellow","Green"))))
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,606
Members
449,089
Latest member
Motoracer88

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