ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Rounding off (https://www.excelbanter.com/excel-discussion-misc-queries/231398-rounding-off.html)

ace

Rounding off
 
Guys,

I have a question.
Suppose I have a column which has values ;
300
315
330
390

Now i want these values rounded off to the nearest quarter,

eg, 300 remains 300.
315 becomes 325
330 becomes 325
and 390 becomes 400

I tried using mround but that rounds off everything to the NEXT quarter.

Any way i can do this automatically??

Thanks,
Ace

Jim Thomlinson

Rounding off
 
assuming the value is in a1

=round(a1/25, 0)*25
--
HTH...

Jim Thomlinson


"ace" wrote:

Guys,

I have a question.
Suppose I have a column which has values ;
300
315
330
390

Now i want these values rounded off to the nearest quarter,

eg, 300 remains 300.
315 becomes 325
330 becomes 325
and 390 becomes 400

I tried using mround but that rounds off everything to the NEXT quarter.

Any way i can do this automatically??

Thanks,
Ace


Luke M

Rounding off
 
I think you are using MROUND incorrectly, as it should do what you are asking
for.

=MROUND(310,25)
evaluates to 300, whereas
=MROUND(315,25)
evaluates to 325
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"ace" wrote:

Guys,

I have a question.
Suppose I have a column which has values ;
300
315
330
390

Now i want these values rounded off to the nearest quarter,

eg, 300 remains 300.
315 becomes 325
330 becomes 325
and 390 becomes 400

I tried using mround but that rounds off everything to the NEXT quarter.

Any way i can do this automatically??

Thanks,
Ace


ace

Rounding off
 
Guys,
Got it, it works like a charm.

Thanks,
Much appreciated,
Ace

"Luke M" wrote:

I think you are using MROUND incorrectly, as it should do what you are asking
for.

=MROUND(310,25)
evaluates to 300, whereas
=MROUND(315,25)
evaluates to 325
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"ace" wrote:

Guys,

I have a question.
Suppose I have a column which has values ;
300
315
330
390

Now i want these values rounded off to the nearest quarter,

eg, 300 remains 300.
315 becomes 325
330 becomes 325
and 390 becomes 400

I tried using mround but that rounds off everything to the NEXT quarter.

Any way i can do this automatically??

Thanks,
Ace



All times are GMT +1. The time now is 05:55 AM.

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