![]() |
Setting a cell to not go below an X value, or above a Y value
Hey, This may be very easy to do, but I just don't have a clue, I've look at most excel variables and they just seem to choose MIN and MAX from columns or tables. What I want to do is I've got the sum adding up say cells A2 and A3 in cell A4. I want cell A4 to never go below 80, or above 200. (Formula in cell A4 would be =SUM(A2:A3)) Anyone think they can help? -- Snakey ------------------------------------------------------------------------ Snakey's Profile: http://www.excelforum.com/member.php...o&userid=27852 View this thread: http://www.excelforum.com/showthread...hreadid=473624 |
=MIN(MAX(A2+A3,80),200)
-- Gary''s Student "Snakey" wrote: Hey, This may be very easy to do, but I just don't have a clue, I've look at most excel variables and they just seem to choose MIN and MAX from columns or tables. What I want to do is I've got the sum adding up say cells A2 and A3 in cell A4. I want cell A4 to never go below 80, or above 200. (Formula in cell A4 would be =SUM(A2:A3)) Anyone think they can help? -- Snakey ------------------------------------------------------------------------ Snakey's Profile: http://www.excelforum.com/member.php...o&userid=27852 View this thread: http://www.excelforum.com/showthread...hreadid=473624 |
This will work...
=IF(SUM(A2:A3)<80,80,IF(SUM(A2:A3)200,200,SUM(A2: A3))) "Snakey" wrote: Hey, This may be very easy to do, but I just don't have a clue, I've look at most excel variables and they just seem to choose MIN and MAX from columns or tables. What I want to do is I've got the sum adding up say cells A2 and A3 in cell A4. I want cell A4 to never go below 80, or above 200. (Formula in cell A4 would be =SUM(A2:A3)) Anyone think they can help? -- Snakey ------------------------------------------------------------------------ Snakey's Profile: http://www.excelforum.com/member.php...o&userid=27852 View this thread: http://www.excelforum.com/showthread...hreadid=473624 |
All times are GMT +1. The time now is 03:50 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com