Sub or Function not defined
Hi Patrick,
When doing calculations in sheets, differecen is shown as 0.35. But when
forcing 15 numbers after comma, it becomes 0.3499999... which is rounded
at 0.3
One (absolutely not nice) method is to first round at 2 numbers after
comma (0.35) and then round at 1 after (0.4)
HTH
@+
FxM
Patrick Simonds a écrit :
I am trying to get this formula to work in my macro, but it seems not to
accept the MROUND, I get a Sub or Function not defined error. I need the
MROUND so that I can get proper rounding results. The formula below is
working with times and without MROUND I sometimes get rounding errors. For
example:
15:21 - 15:00 returns .35 which should round to .4 but rounds to .3
TextBox10.Text = Format(Round(MROUND((CDate(TextBox9.Text) _
- CDate(TextBox8.Text)) * 24), 1), "#.0")
|