Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Remove rows where value = 0

H

I have 690 rows of information with one of the columns called "Feb 03". I would like all rows where the value in Feb 03 is "0" removed and the rows below to move up. There will be approx 250 rows removed. I could do this manually but I will need to be able to do this for future worksheets so a formula to speed up the process would be much appreciated

Thanks in advanc

Malcolm Davidson
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Remove rows where value = 0

Hi Malcolm

Try one of the examples on this page
http://www.rondebruin.nl/delete.htm

Post back if you need help

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Malcolm" wrote in message ...
Hi

I have 690 rows of information with one of the columns called "Feb 03". I would like all rows where the value in Feb 03 is

"0" removed and the rows below to move up. There will be approx 250 rows removed. I could do this manually but I will need to
be able to do this for future worksheets so a formula to speed up the process would be much appreciated.

Thanks in advance

Malcolm Davidson



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Remove rows where value = 0

Hi Malcolm
try the following code, which test for a zero in column A - starting in
row 1 (change this according to your needs)
Frank
----
Public Sub Deletezerorows()
Dim R As Long
Dim C As Range
Dim Rng As Range
On Error GoTo EndMacro
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
If Selection.Rows.Count 1 Then
Set Rng = Selection
Else
Set Rng = ActiveSheet.UsedRange.Rows
End If
For R = Rng.Rows.Count To 1 Step -1
If Cells(R, 1).Value = 0 Then 'look in column A then
Rng.Rows(R).EntireRow.Delete
End If
Next R
EndMacro:
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub


Malcolm wrote:
Hi

I have 690 rows of information with one of the columns called "Feb
03". I would like all rows where the value in Feb 03 is "0" removed
and the rows below to move up. There will be approx 250 rows
removed. I could do this manually but I will need to be able to do
this for future worksheets so a formula to speed up the process would
be much appreciated.

Thanks in advance

Malcolm Davidson



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
Remove last n rows Colin Hayes Excel Worksheet Functions 6 June 12th 09 02:34 AM
remove rows in one sheet from similar rows in another G[_2_] Excel Worksheet Functions 0 November 12th 07 03:57 PM
How do I remove empty Rows Rodders Excel Discussion (Misc queries) 2 January 12th 07 12:04 PM
How to remove a lot of rows? Please help User Excel Discussion (Misc queries) 2 April 30th 06 08:39 PM
How to remove rows for printing abdulie Excel Discussion (Misc queries) 5 January 17th 06 10:45 AM


All times are GMT +1. The time now is 10:09 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"