ExcelBanter

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

ynissel

Rounding
 
When using MRound (Or floor/Ceiling) Is there a seperate function for
negative. Meaning I have a column with positive numbers and negative numbers
which I need rounded to the nearest 1/8th. Do I have to first do an IF to
see if its + then do an Mround (a1,.125) and if its - then Mround (a1,-.125) ?
Thanks.

Kostis Vezeridis

You can use
=MROUND(A1, SIGN(A1)*(1/8))

HTH
Kostis Vezerides

"ynissel" wrote in message
...
When using MRound (Or floor/Ceiling) Is there a seperate function for
negative. Meaning I have a column with positive numbers and negative

numbers
which I need rounded to the nearest 1/8th. Do I have to first do an IF to
see if its + then do an Mround (a1,.125) and if its - then Mround

(a1,-.125) ?
Thanks.




ynissel

Perfect - thanks !!

"Kostis Vezeridis" wrote:

You can use
=MROUND(A1, SIGN(A1)*(1/8))

HTH
Kostis Vezerides

"ynissel" wrote in message
...
When using MRound (Or floor/Ceiling) Is there a seperate function for
negative. Meaning I have a column with positive numbers and negative

numbers
which I need rounded to the nearest 1/8th. Do I have to first do an IF to
see if its + then do an Mround (a1,.125) and if its - then Mround

(a1,-.125) ?
Thanks.






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

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