round up numbers

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a column full of numbers like 1,344,321 ..... and I want to round up
those numners to something like 1,345,000 or 1,350,000.

I tried the formula Roun() but with no good results.

Can you help me?
 
To round to nearest thousands:

RoundedNumber = Round((MyOriginalNumber / 1000), 0) * 1000
 
Here are some results from the immediate window (Control + G). Do not include the commas as
thousand separators in the number being rounded:

Round to nearest 1000
?round (1344321/1000,0)*1000
1344000

Always round up to nearest 1000
?round (int(1344521/1000)+1,0)*1000
1345000

Round to nearest 10000
?round (1344321/10000,0)*10000
1340000

Always round up to nearest 10000
?round (int(1344321/10000)+1,0)*10000
1350000


Tom
_____________________________________

I have a column full of numbers like 1,344,321 ..... and I want to round up
those numners to something like 1,345,000 or 1,350,000.

I tried the formula Roun() but with no good results.

Can you help me?
 
Back
Top