Rounding up in VBA

  • Thread starter Thread starter Art
  • Start date Start date
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
 
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
 
Sorry - expression I posted is not correct. Try this one instead:

Rounded1000 = CInt(MyNumber / 1000) * 1000
 
Back
Top