How to search for "#N/A" in Excel VBA
This will find and Select all occurances of #N/A:
Sub findena()
Set ena = Nothing
For Each r In ActiveSheet.UsedRange
If r.Text = "#N/A" Then
If ena Is Nothing Then
Set ena = r
Else
Set ena = Union(ena, r)
End If
End If
Next
ena.Select
End Sub
--
Gary''s Student - gsnu200793
"viking4020" wrote:
I wish to write vba code that finds occurrences of #N/A, #NAME, etc in Excel
spreadsheets.
|