Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hello all
i'm a little confused here. Hope somebody can help me. With following code: --------------------------------------------------------- Sub Whyyyyyyyyyyyyyyyyyy() x = 1.5 For i = 1 To 4 Debug.Print "(" & x & " * " & i & ") = " & x * i & " == Round(" & x * i & ") = " & Round(x * i, 0) Next i End Sub --------------------------------------------------------- VBA returns me: ------------------------ (1.5 * 1) = 1.5 == Round(1.5) = 2 (1.5 * 2) = 3 == Round(3) = 3 (1.5 * 3) = 4.5 == Round(4.5) = 4 (1.5 * 4) = 6 == Round(6) = 6 ------------------------ Why is Round(1.5) = 2 and Round(4.5) = 4 ????? I don't really get it! Thanks for any help Carlo |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sumproduct issues | Excel Worksheet Functions | |||
deleting round function | Excel Worksheet Functions | |||
Moving a sheet from one work book to another? | Excel Worksheet Functions | |||
My links no longer work . . . | Excel Discussion (Misc queries) | |||
Work Rota - Do I need a formula? | Excel Discussion (Misc queries) |