View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default Remove Cell Contents Macro

Try this:

Sub Testing()

Dim myRange As Range, r As Range
Set myRange = Worksheets("Sheet1").Range("A1")
lrow = Cells(Rows.Count, 1).End(xlUp).Row
Debug.Print lrow
Set myRange = myRange.Resize(lrow, 1)
For Each r In myRange
Debug.Print r.Row, r.Value, r.Address

If LCase(r.Value) = "overall result" Then
Debug.Print r.Row, r.Column
r.ClearContents
End If
Next r


End Sub

"Karen McKenzie" wrote:

I have a spreadsheet that will have information pasted in daily from another
source. How would I set code to automatically remove every occurance of
"Overall Result" from Column A. I know this is a worksheet change Event
Macro but I don't know the code to search in column A and remove these
entries.

Can anyone help?