Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Deletion of rows where a value is satisfied

I have a spreadsheet with 3 colums. Columns are headed Part Number,
Description and Qty.

What I would like to do is delete all rows where the qty value is zero.

I can't do this using auto filter as I have some small sub headings within
the list and want them to stay visible.

Any ideas please?

Many thanks.

Larry.
  #2   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Deletion of rows where a value is satisfied

hi,
assuming the the date is in column a,b and c.
private sub delrows()
dim zo as range
set zo = range("c2")
do while not isempty(zo)
Set zod = zo.offset(1,0)
if zo.value = 0 then
zo.entirerow.delete
set zo = zod
else
set zo = zod
end if
loop
end sub
-----Original Message-----
I have a spreadsheet with 3 colums. Columns are headed

Part Number,
Description and Qty.

What I would like to do is delete all rows where the qty

value is zero.

I can't do this using auto filter as I have some small

sub headings within
the list and want them to stay visible.

Any ideas please?

Many thanks.

Larry.
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Deletion of rows where a value is satisfied

Second Attempt:
Sub DD()
Dim rng as Range, i as Long
set rng = cells(rows.count,3).End(xlup)
for i = rng.row to 2 step - 1
if not isempty(cells(i,3)) then
if cells(i,3).Value = 0 then
cells(i,3).EntireRow.Delete
end if
end if
Next
end Sub

--
Regards,
Tom Ogilvy

"Larry Wallis" wrote in message
...
I have a spreadsheet with 3 colums. Columns are headed Part Number,
Description and Qty.

What I would like to do is delete all rows where the qty value is zero.

I can't do this using auto filter as I have some small sub headings within
the list and want them to stay visible.

Any ideas please?

Many thanks.

Larry.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
rows identification and deletion TUNGANA KURMA RAJU Excel Discussion (Misc queries) 2 April 2nd 07 04:42 AM
Automatic Deletion of Rows ai18ma New Users to Excel 6 April 5th 06 08:25 AM
On deletion of rows Stephen Howe Excel Discussion (Misc queries) 2 October 7th 05 06:02 PM
Deletion of rows where a value is satisfied Larry Wallis Excel Worksheet Functions 1 February 22nd 05 12:41 PM
Deletion of rows according to background color salim Excel Programming 3 June 19th 04 01:27 PM


All times are GMT +1. The time now is 04:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"