View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Kevin Sprinkel Kevin Sprinkel is offline
external usenet poster
 
Posts: 14
Default Rounding Based on Value

Thanks, Bob.

-----Original Message-----
Kevin,

Something like

If myvalue < 1 Then
myvalue = Round(myvalue, 2)
ElseIf myvalue < 10 Then
myvalue = Round(myvalue, 0)
ElseIf myvalue < 100 Then
myvalue = Round(myvalue / 10, 0) * 10
Else
'TBD
End If

--

HTH

Bob Phillips