Results 1 to 10 of 10

Need a macro that will delete a line when "#n/a" appears

Threaded View

  1. #1
    Registered User
    Join Date
    03-16-2009
    Location
    arkansas
    MS-Off Ver
    Excel 2003
    Posts
    17
    I need some help in finding a macro that will delete a line if the message #N/A appears. Right now I have a macro that will hide a row if it has a zero in it and it loops all the way till it hits "done" would like to add the ability to delete a row with #N/A in it, here is my code for the hide zero macro
    Sub Hide_Zeros()
    'Hides all rows less than zero starting at C11
    
    ActiveSheet.Range("e12").Select
    Do Until ActiveCell.Value = "END"
    ActiveCell.Offset(1, 0).Activate
    Cntr = Cntr + 1
    If ActiveCell.Value <= 0 Then
    ActiveCell.EntireRow.Hidden = "true"
    End If
    Loop
    
    End Sub
    Any help would be awesome, thanks!
    Last edited by Paul; 06-09-2009 at 04:31 PM. Reason: Merged post without code tags and last post with code tags.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1