More than two choices for if

jumpmanjones

Board Regular
Joined
Apr 3, 2006
Messages
185
I want to do some thing like the case function in C....

My problem is that if cells a1-g1 are yes, then i want h1 to be yes...if a1-g1 are blank i want h1 to be blank...and if niether of those are true then i want h1 to be no...


THANK YOU!!!
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
What is "the case function in C" ???

Do you want ALL cells in a1:g1 to be yes to trigger a yes in h1, or just find a yes somewhere in that range ?
 
Upvote 0
If you want ALL cells in A1:G1 to be yes for a yes in H1, and ALL cells in A1:G1 to be blank for a blank in h1 . . . .

Code:
=if(countif(A1:G1,"YES")=7,"YES",if((a1&b1&c1&d1&e1&f1&g1)="","","NO"))
 
Upvote 0
In H1
Code:
=IF(COUNTIF(A1:G1,"Yes")=7,"Yes",IF(COUNTIF(A1:G1,"")=7,"","No"))

lenze
 
Upvote 0

Forum statistics

Threads
1,213,520
Messages
6,114,099
Members
448,548
Latest member
harryls

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