Deleting text in a column
Steve if you want wilcards for text and something that isn't case sensitive
use this
If UCase(Cells(x, 3).Value) Like "*SCRATCHED*" Then
Mike
" wrote:
On Feb 22, 8:20 pm, wrote:
On Feb 22, 7:01 pm, Mike H wrote:
Hi,
It's no longer a function it's a sub so try this
Sub REMOVESCRATCHINGS()
For x = 200 To 1 Step -1
If Cells(x, 3).Value = "***SCRATCHED***" Then
Rows(x).EntireRow.Delete
End If
Next
End Sub
Mike
" wrote:
Im trying to create a function that will delete the entire row if a
cell contains the text ***SCRATCHED***.
Function REMOVESCRATCHINGS()
Init = Range("C1:C200")
For COUNTER = 1 To 200
If Init = "***SCRATCHED***" Then
Selection.Delete shift:=xlUp
End If
Next
End Function
I get a type mismatch error message
Thanks for any help.- Hide quoted text -
- Show quoted text -
Mike ..I'll have to play around with your sub - nothing happens when I
run it.. at least there's no error messages. Thanks- Hide quoted text -
- Show quoted text -
Mike...The sub works fine for numbers but I cant make it work for
text
|