Rounding up in VBA

A

Art

Hello:

Does anyone know what function does this in VBA? Rounding
1980 and getting 2000, for example.

Thankyou in advance for your help

art
 
K

Ken Snell

You need to write your own expression based on what you want to do. For
example, to round to the nearest 1000:

Rounded1000 = CInt(My Number \ 1000) * 1000
 
K

Ken Snell

Sorry - expression I posted is not correct. Try this one instead:

Rounded1000 = CInt(MyNumber / 1000) * 1000
 
Top