# Manipulating Round() function in VBA

#### my-lew

##### New Member
Is it possible to specify how you want a number to be rounded. ie: nearest hundeth, thousanth, ten thousanth, ect.......

given_______want

45570______45600

### Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Welcome!

When you use the round function, you need to input a formula in the following format:

=round(number, number of digits)

The "number of digits" specifies how many decimals to round to, as follows:

2 = 2 decimal places
0 = 0 decimal places
-1 = nearest 10
-2 = nearest 100
-3 = nearest 1000

You can also use "ceiling" formala for odd rounding, or roundup or rounddown

Hello my_lew:

One of the ways to do this would be to use the worksheet function ROUND ... if the entry 45570 is in cell A1, then using the following
Code:
``worksheetfunction.RoundUp([a1],-2)``
you can get the result as 45600

I am using EXCEL 97 and I seem to have access to the ROUND function only through the worksheet environment.

Replies
6
Views
815
Replies
1
Views
372
Replies
18
Views
977
Replies
5
Views
383
Replies
4
Views
353

1,219,957
Messages
6,151,145
Members
451,011
Latest member
Pigdog89

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back