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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top