View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rohit Thomas Rohit Thomas is offline
external usenet poster
 
Posts: 21
Default Clear row contents code

Hello All,

I am using the code below to clear the contents of an
entire row if a value from a named range (OperIdDel)
matches the value in column 7. The problem is that I need
it to clear the row only if it's an exact match.

Example: If 99 is one of the values in the named range,
the code will clear the entire row if column 7 has a value
of 599, or 34994, etc. Below is my code...what do I modify
to look for an exact match?


For Each OperDelRng In Sheets("Site Parameters"). _
Range("OperIdDel")
If OperDelRng.Value < "" Then
With Columns(7)
Do
Set LookInRng = .Find(OperDelRng.Value, _
LookIn:=xlValues)
If Not LookInRng Is Nothing Then
LookInRng.EntireRow.ClearContents
End If
Loop While Not LookInRng Is Nothing
End With
End If
Next OperDelRng