Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Clear Contents gibbylinks Setting up and Configuration of Excel 5 October 12th 09 05:04 PM
Clear Contents Secret Squirrel Excel Discussion (Misc queries) 1 February 3rd 09 12:37 AM
to clear contents of a spreadsheet Jerry Excel Discussion (Misc queries) 2 August 17th 07 02:20 AM
to clear contents of a spreadsheet Jerry Excel Discussion (Misc queries) 0 August 17th 07 01:43 AM
Code to clear contents jk Excel Worksheet Functions 3 September 4th 06 06:25 PM


All times are GMT +1. The time now is 11:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"