Clay,
You can adapt the following code to suit your needs.
Dim R As Range
Dim V As Variant
Set R = Range("A1")
If IsError(R) = True Then
If R.Value = CVErr(xlErrNA) Then
Debug.Print "N/A ERROR"
Else
Debug.Print "OTHER ERROR"
End If
Else
Debug.Print "NO ERROR"
End If
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)
"Clayman" <(E-Mail Removed)> wrote in message
news:023F07FD-541D-4FDF-80D5-(E-Mail Removed)...
>I would like to find out if only a certain cell is #N/A due to faulty data
> coming in. Will OnError allow me to prompt the user to input data for the
> faulty cell? Or, can I just check for an error in the cell and call a
> userform iwth the input?
>
> Code:
> For ediro = 4 To 199
> With edi
> If .Cells(ediro, 40).Type = xlerror Then
> ' Form_VacRate will accept input from the user to enter into
> .Cells(ediro,40)
> With Form_VacRate
> .TBempname = empname
> .TBempname.Locked = True
> .TBfilenum = empnum
> .TBfilenum.Locked = True
> .Show
> End If
> vacation = .Cells(ediro, 40).Value
> End With
> next ediro
> --
> Adios,
> Clay Harryman