ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Rounding value in place (https://www.excelbanter.com/excel-worksheet-functions/225594-rounding-value-place.html)

Bagia

Rounding value in place
 
Is there a way to round a value in place? I have an Excel spreadsheet with
values already entered into their respective cells. Now I would like to
round these values down to the nearest millions, i.e.

A4=815,000,001

I would like A4 now to display 815,000,000

Is there a way?

OssieMac

Rounding value in place
 
I think that you will need to use a helper column. Insert a temporary column
beside the numbers and use the following formula example:-

=MROUND(A4,1000000)

Copy the formula down for the length of the data.

Select and Copy the helper column then Select the original data column and
then Paste Special - Values. You can then delete the helper column.



--
Regards,

OssieMac


"Bagia" wrote:

Is there a way to round a value in place? I have an Excel spreadsheet with
values already entered into their respective cells. Now I would like to
round these values down to the nearest millions, i.e.

A4=815,000,001

I would like A4 now to display 815,000,000

Is there a way?


Bernd P

Rounding value in place
 
Hello,

If I understand the question correctly, a sub is needed.

Example:
Sub round2mill()
Range("A1").Formula = Application.WorksheetFunction.Round(Range
("A1").Value, -6)
End Sub

Regards,
Bernd


All times are GMT +1. The time now is 06:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com