PC Review


Reply
Thread Tools Rate Thread

Delete rows in a workbook that contain the same information

 
 
tiff
Guest
Posts: n/a
 
      18th Feb 2009
I'm working on an excel sheet and it has rows that have 0's throughout it.
I'm wondering if there is a way to delete all the rows that contain 0's
throughout the sheet without having to go to each row individually.
 
Reply With Quote
 
 
 
 
Max
Guest
Posts: n/a
 
      19th Feb 2009
In a spare copy .. Try autofilter. Choose: zero (your criteria) from the
autofilter droplist for your key col. Then select the filtered rows (the blue
row headers), right-click > Delete. Remove autofilter.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:23,500 Files:370 Subscribers:66
xdemechanik
---
"tiff" wrote:
> I'm working on an excel sheet and it has rows that have 0's throughout it.
> I'm wondering if there is a way to delete all the rows that contain 0's
> throughout the sheet without having to go to each row individually.

 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      19th Feb 2009
This deletes rows with 0

Sub deleteifzeroonanyrow()
For i = 1 To 10 ' last row to look in
lc = Cells(i, Columns.Count).End(xlToLeft).Column
If Application.CountIf(Range(Cells(i, 1), _
Cells(i, lc)), 0) > 0 Then Rows(i).Delete
Next i
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"tiff" <(E-Mail Removed)> wrote in message
news:F907867E-DA5A-46DB-B201-(E-Mail Removed)...
> I'm working on an excel sheet and it has rows that have 0's throughout it.
> I'm wondering if there is a way to delete all the rows that contain 0's
> throughout the sheet without having to go to each row individually.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete rows if AF and AY empty but F has information Louie Microsoft Excel Worksheet Functions 6 4th Mar 2010 09:51 PM
sort and delete rows of information jlclyde Microsoft Excel Misc 4 6th Nov 2008 04:29 PM
Delete rows with duplicate information Ixtreme Microsoft Excel Programming 5 18th Aug 2007 02:06 PM
I need to filter and delete rows of information between 2 dates =?Utf-8?B?bHBkYXJzcGU=?= Microsoft Excel Programming 12 16th Nov 2006 10:47 PM
delete empty rows in workbook =?Utf-8?B?VG9vTg==?= Microsoft Excel Worksheet Functions 1 10th Aug 2006 11:22 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:13 PM.