Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Modify a Macro
Thanks Bob P for this.
Is it possible to modify this so that it also turns the formula to value if the cell is not equal to 0 or the formula returns an error like #NT/FND,#NUM!, #N/A etc. Sub changetoval() For Each cella In Range("m18:m1000") 'ADJUST RANGE! If cella < 0 Then cella.Value = cella.Value End If Next cella End Sub Thank you in advance. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Modify a Macro
Sub ChangeToVal()
For Each cella In Range("M18:M1000") 'ADJUST RANGE! If IsError(cella.Value) Then cella.Value = "" ElseIf cella.Value < 0 Then cella.Value = cella.Value End If Next cella End Sub -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "carl" wrote in message ... Thanks Bob P for this. Is it possible to modify this so that it also turns the formula to value if the cell is not equal to 0 or the formula returns an error like #NT/FND,#NUM!, #N/A etc. Sub changetoval() For Each cella In Range("m18:m1000") 'ADJUST RANGE! If cella < 0 Then cella.Value = cella.Value End If Next cella End Sub Thank you in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do I email amacro? | Excel Worksheet Functions | |||
Macro question | Excel Worksheet Functions | |||
Editing a simple macro | Excel Worksheet Functions | |||
Closing File Error | Excel Discussion (Misc queries) | |||
Highlight Range - wrong macro, please edit. | Excel Worksheet Functions |