If Then formula - Should be easy!?!

A

Aajaxx

I want to do something that should be very easy, but its not working.
Perhaps you experts can help. =)

I would like to do the following:
IF F5 is greater than 3999 then 10,
IF F5 is less than 2500 then -10,
IF F5 is blank then blank

***A5 is the cell of course***

I've tried these two formulas but they keep coming back with -10 if the
cell is blank.

=IF((F5>3999),10,IF((F5<2500),-10,IF((F5=""),"","")

and

=IF(F5>3999),10, IF(F5<2500),-10,IF(F5=""),"","")))

Thank you, thank you, thank you-
Aajaxx
 
D

Dave Peterson

What should happen between 2500 and 3999?

=IF(F5="","",IF(F5<2500,-10,IF(F5>3999,10,"whathappenshere")))
 
P

Pete

Try this variation:

=IF(F5>3999,10,IF(F5<2500,-10,IF(F5="","","none")))

I've added "none" to help you test it out - you can easily change back
to "" when you are satisfied that it works.

Hope this helps.

Pete
 
F

Fred Smith

A blank is less than 2500, that's why you're getting the -10 result. Put the
test for blank first, as in:

=if(f5="","",if( ...
 
A

Aajaxx

In between 2501 - 3999 the value is 0.

Good question, sometimes you forget the obvious.
 
R

Ron Rosenfeld

In between 2501 - 3999 the value is 0.

Good question, sometimes you forget the obvious.


=IF(F5="","",HLOOKUP(F5,{-1E+307,2500,4000;-10,0,10},2))


--ron
 
D

Dana DeLouis

Perhaps another version if thought of as a signal pulse...

=IF(A1="","",10*((A1>3900)+(A1>=2500)-1))
 
A

Aajaxx

This was presented to me and it works like a charm!

=IF(ISBLANK(F5),"",IF(F5>3999,10,IF(F5<2500,-10,0)))

Thanks everyone for your help. I really appreciated it.

A
 
P

pinmaster

Try:

=IF(F5="","",IF(F5>3999,10,IF(F5<2500,-10,"")))

cell will be left blank if F5 is between 2500 and 3999

HTH
JG
 
A

Aajaxx

Thank you everyone for your help.

I got the formula that works perfect.

=IF(ISBLANK(F5),"",IF(F5>3999,10,IF(F5<2500,-10,0)))

The key was the ISBLANK.

The spreadsheet works perfect now.

Thanks again-
A
 
Top