Problem with excel

Solved/Closed
morpheusmp Posts 2 Registration date Tuesday July 17, 2012 Status Member Last seen July 18, 2012 - Jul 17, 2012 at 03:40 PM
aquarelle Posts 7140 Registration date Saturday April 7, 2007 Status Moderator Last seen March 25, 2024 - Jul 18, 2012 at 09:40 AM
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
Related:

4 responses

aquarelle Posts 7140 Registration date Saturday April 7, 2007 Status Moderator Last seen March 25, 2024 491
Jul 17, 2012 at 03:52 PM
Hi,

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

Regards
0
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.
0
aquarelle Posts 7140 Registration date Saturday April 7, 2007 Status Moderator Last seen March 25, 2024 491
Jul 17, 2012 at 11:55 PM
Hi,
Try this new one :
=IF(A2>7,A2-1,IF(AND(A2>5,A2<=7),A2-0.5,A2))

Regards
0
morpheusmp Posts 2 Registration date Tuesday July 17, 2012 Status Member Last seen July 18, 2012
Jul 18, 2012 at 08:26 AM
It works, thanks a lot. You have just made my life a lot easier.
0
aquarelle Posts 7140 Registration date Saturday April 7, 2007 Status Moderator Last seen March 25, 2024 491
Jul 18, 2012 at 09:40 AM
Happy to have been able to help you :)

Have nice day.
0