rounding up

  • Thread starter Thread starter projectside
  • Start date Start date
P

projectside

I have a question. I have an excel files with numbers in one colum
(multiple rows). How do I round the numbers up in each row withou
doing it one by one?

Please hel
 
How do you want to round them up - nearest 1, 100, 1000. Does the rounding need
to be an actual rounding or just look rounded? Is the data hardwired data, or
is it the result of formulas??
 
columns(5).numberformat = "#,###"

will give a rounded appearance - not sure what you actually want.
 
2 decimal places.. the data is an average price that looks like this:

197.8938 (i need it to be 197.89)
56.34432 (to be 56.34)
29.3193
78.89345
etc...

something like that...they are all in one column with multiple rows..
 
i actually need the numbers to either be rounded up or truncated to
decimal places only so then I can use those numbers in another column
for calculation

197.8938 (i need it to be 197.89)
56.34432 (to be 56.34)
29.3193 (to be 29.32)
78.89345 (to be 78.89)

the rounded numbers will then be used in a calculation to calculate su
total
 
If they are not the result of formulas, and you are happy to lose the detail,
then assuming your data is in say A1:A100, in B1 put =ROUND(A1,2) and copy down
to B100. Now copy B1:B100 and then select A1 and do Edit / Paste Special /
Values. Then just delete B1:B100.

If you don't want to lose the detail, use Col B as the source for your
subtotalling.
 
3 refers to column C (3rd column) adjust to match your column

set rng = Range(Cells(1,3),Cells(rows.count,3).End(xlup))
for each cell in rng
cell.Value = Application.Round(cell.value,2)
Next
 
Why not just insert a new colum with =roundup(a1,0). then
copy paste special>Values. then delete original colum.

Hit the record new macro button while you do this the
first time and you will havwe all the syntax for future
applications.

Pete
 
Back
Top