View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dan R. Dan R. is offline
external usenet poster
 
Posts: 220
Default Look for a value and clear it

I'm trying to find anything in column 9 that = "-//200-" and clear it.
Why does this not work?

iEnd = ws.Cells(65536, 9).End(xlUp).Row
Set rng = ws.Range(ws.Cells(3, 9), Cells(iEnd, 9))
For Each c In rng
If InStr(c, "-//200-") = False Then c.Clear
Next c

Thanks,
-- Dan