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

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

Gerald Higgins

Well-known Member
Joined
Mar 26, 2007
Messages
9,258
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

Gerald Higgins

Well-known Member
Joined
Mar 26, 2007
Messages
9,258
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

lenze

Legend
Joined
Feb 18, 2002
Messages
13,690
In H1
Code:
=IF(COUNTIF(A1:G1,"Yes")=7,"Yes",IF(COUNTIF(A1:G1,"")=7,"","No"))

lenze
 
Upvote 0

Forum statistics

Threads
1,191,032
Messages
5,984,238
Members
439,879
Latest member
KingGoulash

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