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 Mar 9, 2018 8:29 AM

Reply
Question marked as Top-ranking reply

Posted on Mar 9, 2018 10:26 AM

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

5 replies
Question marked as Top-ranking reply

Mar 9, 2018 10:26 AM in response to wendoverman

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 9:53 AM in response to wendoverman

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:36 AM in response to Barry

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?

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

IF function in Numbers for Mac

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.