View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Using Wildcard in VBA IF

rr is an individual cell in the range r.

Basically, we are looping over all the cells in the range and fixing them if
the criteria is met.
--
Gary''s Student - gsnu200800


"Kristen" wrote:

This helped. Can you tell me if "rr" means anything particular?

I also continued to look and found that I could use "Like" and that seemed
to work.

If convertcell Like "P*" Then GoTo TextCell

I used like to just direct the program to skip over those cells. I have not
fully tested this, but I will do some more research.
--
Thanks - K


"Gary''s Student" wrote:

Sub kristen()
Set r = Range("A2:A98")
For Each rr In r
If Left(rr.Value, 2) = "PO" Then
rr.Value = ""
End If
Next
End Sub

--
Gary''s Student - gsnu200800