I think you will get more consistent results from the code I published at

http://groups.google.com/group/micro...7fce6145b70d69
Things my code fix are

- VBA Round function does not support rounding to negative digits

(multiples of 10)

- VBA Round function does not handle slight discrepancies in the binary

value, e.g. 1110*00.865 = 96.015, but =bRound(1110*00.865,2) returns 96.01

instead of 96.02

As a historical question, does anyone have evidence that ASTM rounding has

ever been a standard in banking? Barring that, does anyone know how this

came to be called "banker's rounding" in some circles?

Jerry

"Ron Rosenfeld" wrote:

> On Thu, 13 Mar 2008 15:51:41 -0700, "Anon" <(E-Mail Removed)> wrote:

>

> >I have a customer who wants calculations Rounded per the requirements of

> >ASTM E29. Does anyone know if Microsoft Excel complies with ASTM E29 when

> >numbers are rounded?

> >

> >Thanks

> >Paul

> >

>

> Excel does not, but I believe VBA does. If it does, then you could use this

> UDF:

>

> To enter the UDF, <alt-F11> opens the VBEditor. Ensure your project is

> highlighted in the Project Explorer window, then Insert/Module and paste the

> code below into the window that opens.

>

> To use this, enter the formula

>

> =bRound(num, numdigits)

>

> into some cell where num is either the number you want to round, or a cell

> reference containing that number; numdigits is the number of decimals to round

> to (0 by default).

>

> =========================

> Function bRound(num As Double, Optional numdigits As Long = 0) As Double

> bRound = Round(num, numdigits)

> End Function

> ==========================================

>

> --ron

>