PDA

View Full Version : [SOLVED:] #REF!



blackie42
01-16-2014, 04:53 AM
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

Bob Phillips
01-16-2014, 08:08 AM
Dim cell As Range

For Each cell In Selection

If cell.Formula Like "*REF!*" Then

cell.ClearContents
End If
Next cell

blackie42
01-28-2014, 08:39 AM
thanks for the help - much appreciated

regards