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

Question:

Question: 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

Reply
Question marked as Solved
Answer:
Answer:

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

Question marked as Helpful

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

There’s more to the conversation

Read all replies

Page content loaded

Question marked as Helpful

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

Reply Helpful (1)

Mar 9, 2018 9:36 AM in response to Barry 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?

Mar 9, 2018 9:36 AM

Reply Helpful
Question marked as Solved

Mar 9, 2018 10:26 AM in response to wendoverman 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 10:26 AM

Reply Helpful

Mar 9, 2018 11:11 AM in response to Barry In response to Barry

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

Reply Helpful
User profile for user: wendoverman

Question: IF function in Numbers for Mac