+ Reply to Thread
Results 1 to 9 of 9

Macro, Clear function in a row that has #VALUE!

Hybrid View

  1. #1
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,565

    Re: Macro, Clear function in a row that has #VALUE!

    Hi hzppby,

    Try this while on the 'players' tab:

    Option Explicit
    Sub Macro1()
    
        Dim rngCell As Range
        
        Application.ScreenUpdating = False
        
        For Each rngCell In Range("G1", Range("G" & Rows.Count).End(xlUp))
            If IsError(rngCell) = True Then
                rngCell.ClearContents
            End If
        Next rngCell
        
        Application.ScreenUpdating = True
    
    End Sub
    HTH

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  2. #2
    Registered User
    Join Date
    02-17-2010
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: Macro, Clear function in a row that has #VALUE!

    Worked like a charm! thanks


    Quote Originally Posted by Trebor76 View Post
    Hi hzppby,

    Try this while on the 'players' tab:

    Option Explicit
    Sub Macro1()
    
        Dim rngCell As Range
        
        Application.ScreenUpdating = False
        
        For Each rngCell In Range("G1", Range("G" & Rows.Count).End(xlUp))
            If IsError(rngCell) = True Then
                rngCell.ClearContents
            End If
        Next rngCell
        
        Application.ScreenUpdating = True
    
    End Sub
    HTH

    Robert

+ Reply to Thread

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