Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I've searched the archives and can't really find what I am looking
for. I have a macro that will format a result based upon the number of digits the result contains. If the result is 1000 then I need to round the result to the 10's place (e.g. 1042 would be rounded to 1040). When I put in Round(result, -1), I get a generic error. I know this is the Excel formula. I have copied the code below. If anyone can help it would be greatly appreciated. If result < 0.69 Then new_result = "<0.69" Else If result 1000 Then new_result = Round(result, -1) '''''''''This is where the error occurs.'''''''''' Else If result 100 Then new_result = Round(result, 0) Else If result 10 Then new_result = Round(result, 1) Else new_result = Round(result, 2) End If End If End If End If |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Rounding issue | Excel Worksheet Functions | |||
I need a formula with rounding up & rounding down to the nearest . | Excel Worksheet Functions | |||
Excel Rounding Issue | Excel Discussion (Misc queries) | |||
Rounding issue with Goal Seek for IRR | Excel Worksheet Functions | |||
Another rounding issue | Excel Worksheet Functions |