View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JW[_2_] JW[_2_] is offline
external usenet poster
 
Posts: 638
Default Clearing contents

One way..
Sub Zak()
Dim lRow As Long, r As Long
lRow = Cells.Find(what:="*", After:=[A1], _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious).Row
For r = 2 To lRow
If Not IsEmpty(Range("E" & r)) Then _
Range("E" & r).EntireRow.ClearContents
Next r
End Sub

On May 12, 10:36*am, Zak wrote:
Hi,

Hope u can help me..

I would like to know how i can tell a macro to clear contents when:

If a cell in column E is NOT blank then clear the contents of that entire
row (but NOT delete the row), and i want to start looking for non blanks
after the header row to avoid the hearder getting cleared.

thanks for your help.