Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default Delete rows in a workbook that contain the same information

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.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Delete rows in a workbook that contain the same information

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.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Delete rows in a workbook that contain the same information

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

"tiff" wrote in message
...
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
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
sort and delete rows of information jlclyde Excel Discussion (Misc queries) 4 November 6th 08 04:29 PM
delete empty rows in workbook TooN Excel Worksheet Functions 1 August 10th 06 11:22 AM
How to Delete a Range in Closed Workbook (to Replace Delete Query) [email protected] Excel Discussion (Misc queries) 1 March 8th 06 10:10 AM
How to delete rows when List toolbar's "delete" isnt highlighted? Linda Excel Worksheet Functions 1 May 26th 05 08:39 PM
How can I delete similar rows in excel workbook with many sheets? JSchrader Excel Worksheet Functions 1 April 26th 05 06:40 PM


All times are GMT +1. The time now is 05:36 AM.

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

About Us

"It's about Microsoft Excel"