NessPJ
Active Member
- Joined
- May 10, 2011
- Messages
- 431
- Office Version
- 365
Hi guys,
I've been fiddling around with a routine where i like to look for #N/A values in a selected range and if it is found delete a range of Cells on that row.
So far i've tried searching for String and Error values but i'm probably doing something wrong:
Can anyone help me with this please?
I've been fiddling around with a routine where i like to look for #N/A values in a selected range and if it is found delete a range of Cells on that row.
So far i've tried searching for String and Error values but i'm probably doing something wrong:
Code:
LastRowATImpShtResult3 = Sheets(ATTargetSht).Range("BZ" & "65536").End(xlUp).Row
Dim XResult As Error
n = 0
For n = LastRowATImpShtResult3 To 3 Step -1
XResult = Range("CB" & n).Err
If XResult = xlErrNA Then
Range("BW" & n & ":CF" & n).Delete Shift:=xlUp
End If
Next n
Can anyone help me with this please?