how to use the if = function in numbers?

In numbers, I'm trying to design a table that includes the if/or with > < =. Prior of inputing the data i.e. =if(A1>A2,3) it works I input the data and got the correct info. My problem i.e. =if(B1=B2,1) not data the cell already has the 1. How can I solve the issue? My assumption is that the system reads empty cells (no data) as equals;therefore, the formula reads it as equal none value giving me: 1

Thx

Posted on Dec 5, 2013 6:26 PM

Reply
Question marked as Top-ranking reply

Posted on Dec 5, 2013 6:34 PM

Xenase,


The if() function actually takes three arguments:

IF(if-expression, if-true, if-false)

  • if-expression: A logical expression. if-expression can contain anything as long as the expression can be evaluated as a boolean value. If the expression evaluates to a number, 0 is considered to be FALSE, and any other number is considered to be TRUE.
  • if-true: The value returned if if-expression is TRUE. if-true can containany value. If if-true is omitted (there’s a comma, but no value) and if-expressionevaluates to TRUE, IF will return 0.
  • if-false: An optional argument specifying the value returned if if-expression is FALSE. if-false can contain any value. If if-false is omitted (there’s a comma, but no value) and if-expressionevaluates to FALSE, IF will return 0. If if-false is entirely omitted (there’s no comma after if-true) and if-expressionevaluates to FALSE, IF will return FALSE.



you are leaving the if-false portion blank.


so if you want nothing when the boolean test is false you should enter the empty string for the third argument like:

=if(A1>A2, 3, "")


or


=if(B1=B2, 1, "")



if you do not want any result when either cell is blank you can perform the test:


=if(or(isblank(B1), isblank(B2)), "", if(B1=B2, 1, ""))

4 replies
Question marked as Top-ranking reply

Dec 5, 2013 6:34 PM in response to xenase

Xenase,


The if() function actually takes three arguments:

IF(if-expression, if-true, if-false)

  • if-expression: A logical expression. if-expression can contain anything as long as the expression can be evaluated as a boolean value. If the expression evaluates to a number, 0 is considered to be FALSE, and any other number is considered to be TRUE.
  • if-true: The value returned if if-expression is TRUE. if-true can containany value. If if-true is omitted (there’s a comma, but no value) and if-expressionevaluates to TRUE, IF will return 0.
  • if-false: An optional argument specifying the value returned if if-expression is FALSE. if-false can contain any value. If if-false is omitted (there’s a comma, but no value) and if-expressionevaluates to FALSE, IF will return 0. If if-false is entirely omitted (there’s no comma after if-true) and if-expressionevaluates to FALSE, IF will return FALSE.



you are leaving the if-false portion blank.


so if you want nothing when the boolean test is false you should enter the empty string for the third argument like:

=if(A1>A2, 3, "")


or


=if(B1=B2, 1, "")



if you do not want any result when either cell is blank you can perform the test:


=if(or(isblank(B1), isblank(B2)), "", if(B1=B2, 1, ""))

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.

how to use the if = function in numbers?

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