I'm trying to find a way to find rows with #na so that I can copy the row and past it in another tab so that the error can be analysed.
So far I have the following, but I have some problems
Dim iCntr As Long
Dim lastColumn As Long
For iCntr = Cells(Rows.Count, "A").End(xlUp).Row To 1 Step -1
For lastColumn = Cells.Find(What:="*", SearchDirection:=xlPrevious, SearchOrder:=xlByColumns).Column To 1 Step -1
If Cells(iCntr, lastColumn).Text = "#N/A" Then
MsgBox "row" & iCntr
End If
Next
Next
First of all, the code doesn't seem to find cells with #N/A errors. I'm not sure why.
Also, I have 60K rows and 50 columns and trying to run the code above is taking very long. I would like for the code jump the next line as soon as a #N/A is found as there is no need to check the rest of the columns
Any ideas on how to resolve the previous points?
At the moment I'm just showing a message box, but I the intention is to copy all the row once the #N/A is found and copy it to another page one row after the other.