Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel 2007 Conditional Formula

Status
Not open for further replies.

PlanetOrb

IS-IT--Management
May 25, 2003
4
US
Hey all,

I am using the following formula for a rating system based on the Value of a Cell (A1).

=IF(A1=5,4,IF(A1=5,4,IF(A1=4,3,IF(A1=3,2,IF(A1=2,1,IF(A1=1,0,))))))

It works great until I try and change the first part of the formula:

=IF(A1<=5,4,IF(A1=5,4,IF(A1=4,3,IF(A1=3,2,IF(A1>=2,1,IF(A1=1,0,))))))

Adding the Greater Than sign to the first part of the formula:

=IF(A1<=5,4,

causes it to return a 0 for anything greater than 10. Can anyone give me a pointer on this one?

Thanks!

Mike
 

"Adding the Greater Than sign..."

you did not add a GREATER THAN sign. You added a LESS THAN sign.

"...causes it to return a 0 for anything greater than 10"

The largest test value is 5. Where does 10 come from??? Anything greater than 5 is undefined in your formula.

I'd suggest using a table instead, with an inexact lookup. Check out VLOOKUP or MATCH.

Or just change < to >



Skip,

[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue]
 
My bad, I had shortened the formula down to 5 and under for clairity when I posted.

Thanks for pointing out the problem Skip, I must be going totally brain dead on this one. Works fine now.

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top