'If' formulas - how are they written?

  • Thread starter Thread starter debs1389
  • Start date Start date
D

debs1389

For example, if Cell A3 is greater than 90, the words ' below target'
will appear in cell A4. How is this done? Thank you so much for your
help in advance. I would really appreciate this.
 
debs1389,

in cell A4..................

=IF(A3>90,"below target","")

basic construct.....
=IF(logicaltest, if_true,if_false)

John
 
you can press F1, then look up IF, it will give you good examples. Basically
the way it's setup though, is:

IF(A3>90,"below target","not below target")

the 'not below target' thing is what it says if A3 is NOT greater than 90.

for something to 'appear' in A4 with this, you need to put this formula in
A4.
 
Put the following formula in cell A4.

=if(A3>90,"below target", "")

The second set of quotation marks will yield an empty
cell if A3 is not greater than 90.

Mike.
 
Dave,

At least in Excel 2000, a search of "IF" in Help doesn't bring up
anything.
A search of "if worksheet function" will though.
Go figure??

John

Dave R. said:
you can press F1, then look up IF, it will give you good examples. Basically
the way it's setup though, is:

IF(A3>90,"below target","not below target")

the 'not below target' thing is what it says if A3 is NOT greater than 90.

for something to 'appear' in A4 with this, you need to put this formula in
A4.
 
Hi John,

I don't use "wizards" unless I'm forced to by a bullish company. I usually
use the "index" in help, which when you start typing IF goes right to IF
worksheet function. I should have probably specified though!



John Wilson said:
Dave,

At least in Excel 2000, a search of "IF" in Help doesn't bring up
anything.
A search of "if worksheet function" will though.
Go figure??

John
 
Straight out of Help:-

Returns one value if a condition you specify evaluates to TRUE and another value
if it evaluates to FALSE.
Use IF to conduct conditional tests on values and formulas.

Syntax

IF(logical_test,value_if_true,value_if_false)

Logical_test is any value or expression that can be evaluated to TRUE or
FALSE. For example, A10=100 is a logical expression; if the value in cell A10 is
equal to 100, the expression evaluates to TRUE. Otherwise, the expression
evaluates to FALSE. This argument can use any comparison calculation operator.

Value_if_true is the value that is returned if logical_test is TRUE. For
example, if this argument is the text string "Within budget" and the
logical_test argument evaluates to TRUE, then the IF function displays the text
"Within budget". If logical_test is TRUE and value_if_true is blank, this
argument returns 0 (zero). To display the word TRUE, use the logical value TRUE
for this argument. Value_if_true can be another formula.

Value_if_false is the value that is returned if logical_test is FALSE. For
example, if this argument is the text string "Over budget" and the logical_test
argument evaluates to FALSE, then the IF function displays the text "Over
budget". If logical_test is FALSE and value_if_false is omitted, (that is, after
value_if_true, there is no comma), then the logical value FALSE is returned. If
logical_test is FALSE and value_if_false is blank (that is, after value_if_true,
there is a comma followed by the closing parenthesis), then the value 0 (zero)
is returned. Value_if_false can be another formula.

Example:-

=IF(A1>B1,1,2) - says If A1 is greater than B1, then give me 1, else give me 2
 
In terms of this formula:

=if(A3>90,"below target", "")

Is there a way to make that cell also turn red?
 
Yes, with any formatting really because "" wont show what color the cell
text is. But you can do conditional formatting, if you had "above target"
rather than "", you would set the conditional format when either the value
of the cell is "below target" or when A3>90.
 
Back
Top