'If' formulas - how are they written?

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.
 
R

Ron de Bruin

This way
place this formula in A4

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

John Wilson

debs1389,

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

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

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

John
 
D

Dave R.

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.
 
M

Mike

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.
 
J

John Wilson

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.
 
D

Dave R.

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
 
K

Ken Wright

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
 
T

tarponwilly

In terms of this formula:

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

Is there a way to make that cell also turn red?
 
D

Dave R.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top