Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Round to 2 decimal places
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? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Round to 2 decimal places
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. "petedacook" wrote: 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? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Round to 2 decimal places
Or, to stay with native VB functions, use...
Cells(i, 3).Value = Format(Cells(i, 3).Value, "#.##;;0") -- Rick (MVP - Excel) "Mike H" wrote in message ... 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. "petedacook" wrote: 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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do i round a quotient to specific decimal places? | Excel Worksheet Functions | |||
Round subtotals to two decimal places | Excel Programming | |||
Round variable to 4 decimal places | Excel Programming | |||
FIXED 2 DECIMAL PLACES, MUST ENTER ALL ZEROES AFTER DECIMAL POINT. | Excel Discussion (Misc queries) | |||
ROUND DATA TO 2 DECIMAL PLACES | New Users to Excel |