Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / October 2006

Tip: Looking for answers? Try searching our database.

Modify a Macro

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
carl - 28 Oct 2006 01:51 GMT
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.
Bob Phillips - 28 Oct 2006 10:32 GMT
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

Signature

HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

> Thanks Bob P for this.
>
[quoted text clipped - 11 lines]
>
> Thank you in advance.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.