SOLVED

=IF Function, I think

Copper Contributor

So here is my problem, lets start with what i have;

=COUNTIF(C3,">"""),IF(AND(X3=FALSE,Y3=FALSE,Z3=FALSE,AA3=FALSE,AB3=FALSE,AC3=FALSE),"Risk",IF(AND(X3=TRUE,Y3=TRUE,Z3=TRUE,AA3=TRUE,AB3=TRUE,AC3=TRUE),"No Risk",""))

 

The idea of which is, if C3 is greater than null, then we need to look at the next part, so if X3,Y3,Z3,AA3,AB3,AC3 are all false then it should result in this cell showing Risk, but if any of the cells X3,Y3,Z3,AA3,AB3,AC3 are true then No Risk would show.

 

I know that the two parts work separately, but I just cannot find a way to join the Countif and the IF functions.

13 Replies
Hello Andy,
I guess that this is what you need:
=IF(C3=“”+X3+Y3+Z3+AA3+AB3+AC3,
“No Risk”,
“Risk”)

Hi Twifoo

Many thanks for your help, much simpler than my way, but comes back with a #value!

 

I am guessing that, that because although looking at X3-AC3, it is not looking for a True or False statement against them.  In this case, True would mean that if any one of the X3 to AC3 are true, then that would =No Risk, and a false to X3 to AC3 would = Risk 

Try this:
=IF(ISBLANK(C3)+X3+Y3+Z3+AA3+AB3+AC3,
“No Risk”,
Risk”)
The last argument should be “Risk”
Given that X3:AC3 is a contiguous range, the formula can be reduced to this:
=IF(ISBLANK(C3)+SUMPRODUCT(—X3:AC3),
“No Risk”,
“Risk”)

Thanks for you continued help, but still now working, anything you can think of?

 

If the formula returns your desired result, then that should be it.

Twifoo, thank you, but please replace now with NOT, sorry my mistake

 

What result does the formula return?
best response confirmed by Andy_Snow (Copper Contributor)
Solution
Try this:
=IF((C3="")+SUMPRODUCT(--X3:AC3),
“No Risk”,
“Risk”)

Works a treat, thank you very much for your time.

Works a treat, thank you for both your time and effort

You're very much welcome!
1 best response

Accepted Solutions
best response confirmed by Andy_Snow (Copper Contributor)
Solution
Try this:
=IF((C3="")+SUMPRODUCT(--X3:AC3),
“No Risk”,
“Risk”)

View solution in original post