Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VB Round( ) function
If in a cell on a spreadsheet, I enter the following equation:
=ROUND(50.5, 0) I obtain the result 51, which I would expect, since 0.5 should be rounded up. If I write the following VB funcion: Function RoundFunc(Mark As Integer) As Integer RoundFunc = Round(Mark, 0) End Function And then enter the following equation into a cell: =RoundFunc(50.5) I obtain the result 50. i.e. 0.5 is rounded down Why the difference? Is there a function that I can use in my VB code that will round 0.5 up rather than down? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Round Function | Excel Worksheet Functions | |||
Round function | Excel Discussion (Misc queries) | |||
how do i set up round function | Excel Worksheet Functions | |||
help with round function | Excel Worksheet Functions | |||
Round Function | Excel Discussion (Misc queries) |