mattiaturalla
Technical User
Am trying to delete rows from a spreadsheet where vlookup has left #N/A as the result. There are a couple of good threads as to how to get vlookup to give a different answer - but given that the error.type for #N/A = 7 there really should be some easy way to make this formula work. I have tried lots around this theme;
Range("a1").Select
Do Until ActiveCell.Value = "Stop"
If ActiveCell.Value.Error.Type = 7 Then
Range(ActiveCell, ActiveCell.Offset(0, 7)).Select
Selection.Delete Shift:=xlUp
Else
ActiveCell.Offset(1, 0).Select
End If
the answers probably obvious - but i just can't see it
Range("a1").Select
Do Until ActiveCell.Value = "Stop"
If ActiveCell.Value.Error.Type = 7 Then
Range(ActiveCell, ActiveCell.Offset(0, 7)).Select
Selection.Delete Shift:=xlUp
Else
ActiveCell.Offset(1, 0).Select
End If
the answers probably obvious - but i just can't see it