Dim rw as Long, i as Long
rw = cells(rows.count,1).End(xlup).Row
for i = rw to 9 step -1
if Application.Sum(Cells(rw,3).Resize(1,29)) = 0 then
rows(rw).Delete
end if
Next
Hopefully your data actually contains numbers and not numbers stored as
strings.

Signature
Regards,
Tom Ogilvy
> I have a spreadsheet with amounts that start in column C and goes through
> column AE (columns A & B contain an entity number and an entity name). The
[quoted text clipped - 15 lines]
>
> Tim
TJN - 26 Jul 2005 22:28 GMT
Tom -
I punched this in and it deletes only the very last row of data (which
happens to sum to zero - I didn't test to see what happens if it doesn't sum
to zero). I was messing around with an Offset command to move up a row after
the if..then statement, but I can't seem to get it to work. Am I missing
something?
Thanks for your help.
Tim
> Dim rw as Long, i as Long
> rw = cells(rows.count,1).End(xlup).Row
[quoted text clipped - 30 lines]
> >
> > Tim
Tom Ogilvy - 27 Jul 2005 01:00 GMT
A couple of typos - try this which worked in my test:
Sub ABCD()
Dim rw As Long, i As Long
rw = Cells(Rows.Count, 1).End(xlUp).Row
For i = rw To 9 Step -1
If Application.Sum(Cells(i, 3).Resize(1, 29)) = 0 Then
Rows(i).Delete
End If
Next
End Sub

Signature
regards,
Tom Ogilvy
> Tom -
> I punched this in and it deletes only the very last row of data (which
[quoted text clipped - 41 lines]
> > >
> > > Tim
TJN - 27 Jul 2005 20:17 GMT
Tom -
Thanks. The macro works great. I appreciate your help.
Tim
> A couple of typos - try this which worked in my test:
>
[quoted text clipped - 62 lines]
> > > >
> > > > Tim
ron - 30 Jan 2007 01:40 GMT
Hi TJN,
I would like to know the step-by-step to use this macro as I need it too. Do
you mind telling me? Thanks, sorry for the trouble as I am total beginner in
macros.
Sharon
> Tom -
>
[quoted text clipped - 68 lines]
> > > > >
> > > > > Tim