G
Guest
Hi, VB Novice so please don't laugh at the code!
I keep getting Run time error "Application-defined or object-defined error"
with the following line " If Cells(irisk, 20).Value = ("Internal") Then" in
the code below. I imagine it is related to the way I am defining the Value
as a string. (I am trying to search down column T and remove all rows that
contain the word "internal" in columnT. Can anyone tell me what I'm doing
wrong please?
'<==========
ActiveWorkbook.Sheets("Customer Risk Log").Select
Dim lastriskrow As Long, irisk As Long
lastriskrow = Cells(Rows.Count, 1).End(xlUp).Row
For i = lastriskrow To 2 Step -1
If Cells(irisk, 20).Value = ("Internal") Then
Rows(irisk).Delete
End If
Next
'<==========
Thanks,
Nick
I keep getting Run time error "Application-defined or object-defined error"
with the following line " If Cells(irisk, 20).Value = ("Internal") Then" in
the code below. I imagine it is related to the way I am defining the Value
as a string. (I am trying to search down column T and remove all rows that
contain the word "internal" in columnT. Can anyone tell me what I'm doing
wrong please?
'<==========
ActiveWorkbook.Sheets("Customer Risk Log").Select
Dim lastriskrow As Long, irisk As Long
lastriskrow = Cells(Rows.Count, 1).End(xlUp).Row
For i = lastriskrow To 2 Step -1
If Cells(irisk, 20).Value = ("Internal") Then
Rows(irisk).Delete
End If
Next
'<==========
Thanks,
Nick