Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Question:

# Question:Q:IF function in Numbers for Mac

I have a cell with two IF expressions in it. I want the if-false outcome to display nothing, not even FALSE as it is doing at the moment when I put opening and closing parantheses for the if-false outcome. It works if I just have one IF expression. Is there something extra I have to do for two IF expressions?

iMac, macOS High Sierra (10.13.3)

Posted on

Question marked as Solved

Hi w,

Your formula tells Numbers what to do if the AF2 IS greater than zero, but doesn't tell it what to do if AF2 is 0 or less:

IF(AF2>0,IF(\$J2="y",A2,""))

cond 1: AF2>0

• true: IF(\$J2="y",A2,"")
• cond 2: \$J2="y"
• true: A2
• false: ""
• false: not specified, so return FALSE

Adding a 'dothat' part to the first IF may produce what you want:

IF(AF2>0,IF(\$J2="y",A2,""),"")

Logically, this is the same as 'If AF2 is greater than zero AND \$J2 contains "y", A2, otherwise ""'

Which can be expressed in a formula as:

IF(AND(AF2>0,\$J2="y"),A2,"")

Regards,

Barry

Posted on

Hi w'

IF(condition 1,dothis,IF(condition 1,dothat,""))

condition 1=TRUE -> this is done

condition 1=FALSE -> condition 2 is tested

condition 2 is TRUE -> that is done

condition 2 is FALSE -> "" is done

"": The quotation marks enclose a text string. In this case, where there is 'nothing' between the quotes, the quotation marks enclose a null string, a text value with zero length, which gives the appearance of an empty cell.

Regards

Barry

Hi w'

Check where you've placed the commas and the parentheses.

If you get stuck on searching for the error, paste a copy of the formula here.

Regards,

Barry

There’s more to the conversation

Hi w'

IF(condition 1,dothis,IF(condition 1,dothat,""))

condition 1=TRUE -> this is done

condition 1=FALSE -> condition 2 is tested

condition 2 is TRUE -> that is done

condition 2 is FALSE -> "" is done

"": The quotation marks enclose a text string. In this case, where there is 'nothing' between the quotes, the quotation marks enclose a null string, a text value with zero length, which gives the appearance of an empty cell.

Regards

Barry

Mar 9, 2018 9:53 AM

Thanks very much for that Barry. I’m still not quite getting it though. This is what I have: IF(AF2>0,IF(\$J2="y",A2,"")). As I see it I’ve got the opening and closing quotation marks for the if-false outcome but instead of an empty cell I get FALSE. As I’ve said I don’t want the cell to display anything when the if-false is met. Can you help further please?

Mar 9, 2018 9:36 AM

Question marked as Solved

Hi w,

Your formula tells Numbers what to do if the AF2 IS greater than zero, but doesn't tell it what to do if AF2 is 0 or less:

IF(AF2>0,IF(\$J2="y",A2,""))

cond 1: AF2>0

• true: IF(\$J2="y",A2,"")
• cond 2: \$J2="y"
• true: A2
• false: ""
• false: not specified, so return FALSE

Adding a 'dothat' part to the first IF may produce what you want:

IF(AF2>0,IF(\$J2="y",A2,""),"")

Logically, this is the same as 'If AF2 is greater than zero AND \$J2 contains "y", A2, otherwise ""'

Which can be expressed in a formula as:

IF(AND(AF2>0,\$J2="y"),A2,"")

Regards,

Barry

Mar 9, 2018 10:26 AM

Thanks very much Barry for your second answer. I understand it now and completing the first IF statement as you showed made all the difference. I’ve also tried the suggested alternative formula but I’m getting a syntax error at the moment. I’ve still got lots to learn about Numbers!

Mar 9, 2018 11:11 AM

Hi w'

Check where you've placed the commas and the parentheses.

If you get stuck on searching for the error, paste a copy of the formula here.

Regards,

Barry

Mar 9, 2018 12:45 PM

User profile for user: wendoverman

Question: IF function in Numbers for Mac