=IF statement

D

Dick

I have a column of numbers that I am trying to perform =IF statement on. I
keep getting TRUE or FALSE in my cells. How do I actually get the number
there instead of the TRUE or FALSE

Thank you in advance
 
J

JulieD

Hi Dick

here's some examples of how to use the IF function
=IF(A1>10,A1,B1)
displays the values in the cell references

=IF(A1>10,2,5)
displays the values 2 (if true) or 5 (if false)

=IF(A1>10,A1*1.1,A1*1.05)
if true, displays the value of A1 plus 10%, if false displays the value of
A1 plus 5%

=IF(A1>10,"Good","Bad")
returns the text values Good or Bad.

=IF(A1>10,IF(A1>20,"Very Good","Good"),IF(A1>5,"Bad","Shocking"))
nested IF to return the values of Very Good (if over 20), Good (if over 10),
Bad (if over 5) and Shocking if 5 or under.

Hope this gives you a bit of an idea of the different ways an IF function
can be used.

Regards
julieD
 
N

Nick Hodge

Dick

Paste the formula you have

IF uses the syntax

=IF(Test,Do_This_If_True,Else_Do_This)

Do you have all three arguments?

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
[email protected]
 
D

Dick

Nick I have all the arguments correct but for the life of me I don't get the
values only TRUE or FALSE
Maybe I can send you the spreadsheet and see what you come up with
 
D

Dick

Julie I know how to use it but I don't get numbers there only TRUE or False
Maybe I can send you the spreadsheet and you can try it yourself
Dick
 
J

JulieD

Hi Dick

yep, send it to me as this doesn't make much sense (julied_ng at hcts dot
net dot au)

Regards
JulieD
 
D

Debra Dalgleish

What is your formula, and what values are in the cells that the formula
refers to?
 
D

Dick

Debre here is the formula. =IF(O1,O1=>100,O1+O1*.05)
All I am doing is applying it to a column of numbers, I can send the
spreadsheet but I will need your email. I don't think I can attach it here
Dick
 
D

Debra Dalgleish

Your formula says:

If there is something in cell O1
Then whatever is in cell O1 is greater than or equal to 100
(this part will result in either TRUE or FALSE)
Otherwise add the contents of cell O1 and O1*.05

What do you really want the formula to do?

For example, you could change the formula to:

=IF(O1>=100,O1*1.05,O1)

That formula says:

If whatever is in cell O1 is greater than or equal to 100
Multiply O1*1.05
Otherwise, return O1
 
D

Dave Peterson

Make sure you used the letter oh and the number zero correctly in that formula:
=IF(o1>=100,o1*1.05,o1)

And when I had a number in O1, it worked fine for me.
 
Top