rounding out "time"
this formula works for me when i need to round out a number to the nearest
1/4;
however,
when i need to round out time to the nearest 15 minutes, it does not... any
sugggestions?
Dim vTargetValue1 As Long
Dim vTargetValue2 As Double
Dim vTargetValue
Const BillingIncrement = 25
If target.Count = 1 Then
vTargetValue1 = target.Value \ BillingIncrement
vTargetValue2 = target.Value / BillingIncrement
If vTargetValue1 < vTargetValue2 Then
target.Value = (vTargetValue1 + 1) / 100 * BillingIncrement
End If
End If
thanks in advance,
mark
|