View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Zone[_2_] Zone[_2_] is offline
external usenet poster
 
Posts: 43
Default Macro to clear range contents when cell contents are changed b

Sub Test()
Dim j As Integer
For j = 5 To 50
If Application.WorksheetFunction.Sum(Range("a" & CStr(j) & ":e" &
CStr(j))) = 0 Then _
Range(("f") & CStr(j) & ":n" & CStr(j)).Clear
Next j
End Sub
James
"Shelly" wrote in message
...
This is very close to something I want to do, but I just can figure out
how
to make changes to this code to get it to work.

Here's what I'm looking for:

When all the cells in range A5:E5 = zero
then
delete the value in F5:N5

And I need to repeat this down from rows 5 through 50.

THANKS!