Calculations - Max and Min

G

Guest

How do I set a max value in a calculation... Here is what I wast to do in
words:

take cell a2 subtract it from 210 and if difference is > 60 then set to 60,
if not, then leave value of calculation in b2.

Also, I need to set the minimum value to be 0 and not negative numbers.
 
G

Guest

THis is what I have so far... =IF((210-E8)>60,60) and it works for valuse
where the outcome is > 60, it sets it to 60 but does not work for values
where the outcome is < 60 or where E8 is greater than 210, it displays a
value of FALSE.
 
R

Ron Coderre

Try this:

=MAX(MIN(210-A2,60),0)

Does that help?
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)
 
G

Guest

That worked, thanks for the assistance.

Ron Coderre said:
Try this:

=MAX(MIN(210-A2,60),0)

Does that help?
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top