ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Rounding down (https://www.excelbanter.com/excel-worksheet-functions/90916-rounding-down.html)

John

Rounding down
 
I was wondering if anyone can tell me if this is possible. I need to create
a formula based on the results of date in two separate fileds. Suppose I
have a field with 31064.47 and another with 28738. I wand to subtract the
2nd number from the first, then round the result to the nearest increment of
500. For example, 31064.47 subtract 28738 equals 2326.47. I would like to
round that result down to the nearest increment of 500 or 2000.

Can this be done, and how?

kassie

Rounding down
 
Say you have your 2 numbers in A1 and A2, then where you do the calculation,
enter the following formula:
=ROUNDDOWN(A1-A2,-3)

"John" wrote:

I was wondering if anyone can tell me if this is possible. I need to create
a formula based on the results of date in two separate fileds. Suppose I
have a field with 31064.47 and another with 28738. I wand to subtract the
2nd number from the first, then round the result to the nearest increment of
500. For example, 31064.47 subtract 28738 equals 2326.47. I would like to
round that result down to the nearest increment of 500 or 2000.

Can this be done, and how?


Bob Phillips

Rounding down
 
=FLOOR(A1-A2,500)

--
HTH

Bob Phillips

(replace somewhere in email address with googlemail if mailing direct)

"John" wrote in message
...
I was wondering if anyone can tell me if this is possible. I need to

create
a formula based on the results of date in two separate fileds. Suppose I
have a field with 31064.47 and another with 28738. I wand to subtract the
2nd number from the first, then round the result to the nearest increment

of
500. For example, 31064.47 subtract 28738 equals 2326.47. I would like

to
round that result down to the nearest increment of 500 or 2000.

Can this be done, and how?




[email protected]

Rounding down
 
Hello,

If the second number can be greater than the first and if the multiple
of 500 has to be <= the difference:

1. =IF(A1-A20,ROUNDDOWN((A1-A2)*2,-3)/2,ROUNDUP((A1-A2)*2/-3)/2)

2. =IF(A1-A20,FLOOR(A1-A2,500),CEILING(A1-A2,-500))

HTH,
Bernd



All times are GMT +1. The time now is 02:06 PM.

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