ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   WHATS AN EASY FUNCTION TO USE TO ROUND TO THE NEAREST THOUSAND? (https://www.excelbanter.com/excel-worksheet-functions/8477-whats-easy-function-use-round-nearest-thousand.html)

Martina

WHATS AN EASY FUNCTION TO USE TO ROUND TO THE NEAREST THOUSAND?
 
How do I round to the nearest thousand without individually having to do it
for every cell?

Frank Kabel

Hi
if you want to do this for many cells you'll have to use VBA. Another
option: In a helper cell enter
=ROUND(A1,-3)
and copy for all rows

--
Regards
Frank Kabel
Frankfurt, Germany

Martina wrote:
How do I round to the nearest thousand without individually having to
do it for every cell?




Don Guillett

Pls don't type in all caps.

Sub roundto1000()
For Each c In Selection
c.Value = Round(c / 1000, 0) * 1000
Next c
End Sub

--
Don Guillett
SalesAid Software

"Martina" wrote in message
...
How do I round to the nearest thousand without individually having to do

it
for every cell?




Martina

What is a VBA? Doing it in a helper cell means you have to do it for every
cell in the range. I als need to decrease the cell value more i.e. instead
of having 47,000 I need 47.

"Frank Kabel" wrote:

Hi
if you want to do this for many cells you'll have to use VBA. Another
option: In a helper cell enter
=ROUND(A1,-3)
and copy for all rows

--
Regards
Frank Kabel
Frankfurt, Germany

Martina wrote:
How do I round to the nearest thousand without individually having to
do it for every cell?





Don Guillett

Give us your range (a2:c400)??? and then my macro can be modified to work
for you. You would then copy into a module and execute to change all. The
easiest, for you, would be to:

highlight the cells to changeright click sheet tabview codecopy\paste my
macroput cursor somewhere in the macro textF5if all is well,SAVE

--
Don Guillett
SalesAid Software

"Martina" wrote in message
...
What is a VBA? Doing it in a helper cell means you have to do it for

every
cell in the range. I als need to decrease the cell value more i.e.

instead
of having 47,000 I need 47.

"Frank Kabel" wrote:

Hi
if you want to do this for many cells you'll have to use VBA. Another
option: In a helper cell enter
=ROUND(A1,-3)
and copy for all rows

--
Regards
Frank Kabel
Frankfurt, Germany

Martina wrote:
How do I round to the nearest thousand without individually having to
do it for every cell?








All times are GMT +1. The time now is 12:03 AM.

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