Given numbers like 499, 73433, 2348 what VBA can I use to round to the nearest 5 or 10? or an arbitrary number?
By 5:
499 -> 500 2348 -> 2350
Try this function
--------------start----------------
Function Round_Up(ByVal d As Double) As Integer Dim result As Integer result = Math.Round(d) If result >= d Then Round_Up = result Else Round_Up = result + 1 End If End Function
-------------end ------------