ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Limit a calculation to a certain number (https://www.excelbanter.com/excel-programming/362373-limit-calculation-certain-number.html)

jlatenight

Limit a calculation to a certain number
 
Here's what I have for a formuls for a cell: =ROUNDDOWN((C17/10),0) I
want to take the answer for that (which happens to be 1051) and say
"limit the answer to 1000". In other words, for that column, I want
the maximum answer returned to be 1000. Can't be more than that, but
it can be under. How would I do that?? Thanks all!
-Jon


Ron Coderre

Limit a calculation to a certain number
 
Try this:

=MIN(ROUNDDOWN(C17/10,0),1000)

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"jlatenight" wrote:

Here's what I have for a formuls for a cell: =ROUNDDOWN((C17/10),0) I
want to take the answer for that (which happens to be 1051) and say
"limit the answer to 1000". In other words, for that column, I want
the maximum answer returned to be 1000. Can't be more than that, but
it can be under. How would I do that?? Thanks all!
-Jon



Joerg

Limit a calculation to a certain number
 
"jlatenight" wrote in message
ups.com...
Here's what I have for a formuls for a cell: =ROUNDDOWN((C17/10),0) I
want to take the answer for that (which happens to be 1051) and say
"limit the answer to 1000". In other words, for that column, I want
the maximum answer returned to be 1000. Can't be more than that, but
it can be under. How would I do that?? Thanks all!
-Jon


=MIN(ROUNDDOWN((C17/10),0),1000)

Joerg



Joerg

Limit a calculation to a certain number
 

"Joerg" wrote in message
...
"jlatenight" wrote in message
ups.com...
Here's what I have for a formuls for a cell: =ROUNDDOWN((C17/10),0) I
want to take the answer for that (which happens to be 1051) and say
"limit the answer to 1000". In other words, for that column, I want
the maximum answer returned to be 1000. Can't be more than that, but
it can be under. How would I do that?? Thanks all!
-Jon


=MIN(ROUNDDOWN((C17/10),0),1000)

Joerg

I just noticed that you could shorten your formula:
=MIN(INT(C17/10),1000)

INT always rounds down, so it fits the bill in your case.

Joerg



jlatenight

Limit a calculation to a certain number
 
=MIN(INT(C17/10),1000) Worked perfectly!!! Thanks everyone who
replied!!



All times are GMT +1. The time now is 11:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com