Consulting

Results 1 to 3 of 3

Thread: #REF!

  1. #1

    #REF!

    Hi,

    I'm running a macro that gets rid of duplicate entries.

    Once it finishes it leaves some cells at the bottom (in column I) with #REF!

    There is a formula within the cell(s) =VLOOKUP(#REF!, Sheet2!AG:AG, 1, FALSE)

    Wondering if theres some code that would clear any cells in column I that has this error

    thanks for any help

    Jon

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,446
    Location
    Dim cell As Range
    
        For Each cell In Selection
        
            If cell.Formula Like "*REF!*" Then
            
                cell.ClearContents
            End If
        Next cell
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    thanks for the help - much appreciated

    regards

Posting Permissions

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