Problem with excel [Solved/Closed]

Report
Posts
2
Registration date
Tuesday July 17, 2012
Status
Member
Last seen
July 18, 2012
-
Posts
7081
Registration date
Saturday April 7, 2007
Status
Anonymous
Last seen
September 25, 2020
-
Hello,

I was trying to write a formula in excel where IF A1 is greater than 7 then 1 would be substracted from it and if it is greater than 5 but less than or equal to 7 then .50 would be substracted from it. Can someone help me out with this formula. So far this is what I have but it does not do everything that I want. =IF(A2<=7,A2-0.5,IF(A2>7,A2-1,IF(A2>=5,A2+0.5)))

Regards

4 replies

Posts
7081
Registration date
Saturday April 7, 2007
Status
Anonymous
Last seen
September 25, 2020
498
Hi,

Try like this :
=IF(A2>7,A2-1,IF(AND(A2>5,A2<=7),A2-0.5,A2+0.5))

Regards
Your formula doesn't work the way that I would like. Maybe I need to explain what I need better.

I need a formula that will let A2 stay the same if it is 5 or lower, if it is 5.25 to 7, .50 needs to be subtracted from it and if A2 is 7.25 or greater, 1 needs to subtracted from it.
Posts
7081
Registration date
Saturday April 7, 2007
Status
Anonymous
Last seen
September 25, 2020
498
Hi,
Try this new one :
=IF(A2>7,A2-1,IF(AND(A2>5,A2<=7),A2-0.5,A2))

Regards
Posts
2
Registration date
Tuesday July 17, 2012
Status
Member
Last seen
July 18, 2012

It works, thanks a lot. You have just made my life a lot easier.
Posts
7081
Registration date
Saturday April 7, 2007
Status
Anonymous
Last seen
September 25, 2020
498
Happy to have been able to help you :)

Have nice day.