Re: If sum = 0, delete row
- From: "Tom Ogilvy" <twogilvy@xxxxxxx>
- Date: Tue, 26 Jul 2005 12:55:28 -0400
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.
--
Regards,
Tom Ogilvy
"TJN" <TJN@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:3F7C72BD-C725-48D9-B7CE-EB255C9B539A@xxxxxxxxxxxxxxxx
> I have a spread*** with amounts that start in column C and goes through
> column AE (columns A & B contain an entity number and an entity name).
The
> number of rows varies, but it is typically about 600 rows of data. This
data
> begins on row 9. Row 8 contains the column headers and the 1st 7 rows
> contain junk that comes over from the program I download this data from.
It
> can be eliminated if it helps.
>
> Basically I am looking for a macro that steps through each row of data and
> if the sum of column C through column AE = zero, I would like the entire
row
> to be deleted.
>
> Does anybody have any ideas? I feel bad because this is the third time I
> have come to this group for help. Each time the solutions have been
> terriffic. I keep hoping I can answer a question instead of always
asking,
> but so far all the questions asked have been above my skill level.
>
> Thanks,
>
> Tim
.
- Follow-Ups:
- Re: If sum = 0, delete row
- From: TJN
- Re: If sum = 0, delete row
- References:
- If sum = 0, delete row
- From: TJN
- If sum = 0, delete row
- Prev by Date: Re: Where can I find the Function names in other languages
- Next by Date: RE: with random No's calc how can I stop two different columns predic.
- Previous by thread: If sum = 0, delete row
- Next by thread: Re: If sum = 0, delete row
- Index(es):
Loading