Round to 2 decimal places

  • Thread starter Thread starter petedacook
  • Start date Start date
P

petedacook

Hello,

I am trying to round figures in a cell to the second decimal place....but I
cannot seem to do it and I cannot seem to find help in my books.

I have coe put together to put the figure in the cells, but it has many
decimal places.

This is what I have done so far and nothing:

Do While I <= 50
round(Cells(I, 3).Value,2)
I = I + 1
Loop

OR

Do While I <= 50
round(Cells(I, 3) ,2)
I = I + 1
Loop

Please help?
 
Hi,

try this

i = 1
Do While i <= 50
Cells(i, 3).Value = WorksheetFunction.Round(Cells(i, 3), 2)
i = i + 1
Loop


--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
 
Or, to stay with native VB functions, use...

Cells(i, 3).Value = Format(Cells(i, 3).Value, "#.##;;0")
 
Back
Top