#1   Report Post  
Posted to microsoft.public.excel.misc
Liam Tutty
 
Posts: n/a
Default "Mass" Delete


Does anybody know of any way to do this...I have to compile a
spreadsheet every month for work, and always end up spending hourse
deleting rows where the information is not all present. Is there any
way I can say, Delete every row which has no information in Column E.

This would save me literally about 4 hours at the end of each month.

Thanks in advance,
Liam.


--
Liam Tutty
------------------------------------------------------------------------
Liam Tutty's Profile: http://www.excelforum.com/member.php...o&userid=29704
View this thread: http://www.excelforum.com/showthread...hreadid=494156

  #2   Report Post  
Posted to microsoft.public.excel.misc
Ron de Bruin
 
Posts: n/a
Default "Mass" Delete

Hi


Sub Example3()
Dim Lrow As Long
Dim CalcMode As Long
Dim StartRow As Long
Dim EndRow As Long
With Application
CalcMode = .Calculation
.Calculation = xlCalculationManual
.ScreenUpdating = False
End With

With ActiveSheet
.DisplayPageBreaks = False
StartRow = 1
EndRow = .Cells(.Rows.Count, "E").End(xlUp).Row
For Lrow = EndRow To StartRow Step -1
If IsError(.Cells(Lrow, "E").Value) Then
'Do nothing, This avoid a error if there is a error in the cell

ElseIf .Cells(Lrow, "E").Value = "" Then .Rows(Lrow).Delete
'This will delete each row if the cell is empty or have a formula that evaluates to ""

End If
Next
End With
With Application
.ScreenUpdating = True
.Calculation = CalcMode
End With
End Sub


See also
http://www.rondebruin.nl/delete.htm




--
Regards Ron de Bruin
http://www.rondebruin.nl


"Liam Tutty" wrote in message
...

Does anybody know of any way to do this...I have to compile a
spreadsheet every month for work, and always end up spending hourse
deleting rows where the information is not all present. Is there any
way I can say, Delete every row which has no information in Column E.

This would save me literally about 4 hours at the end of each month.

Thanks in advance,
Liam.


--
Liam Tutty
------------------------------------------------------------------------
Liam Tutty's Profile: http://www.excelforum.com/member.php...o&userid=29704
View this thread: http://www.excelforum.com/showthread...hreadid=494156



  #3   Report Post  
Posted to microsoft.public.excel.misc
Danny@Kendal
 
Posts: n/a
Default "Mass" Delete

"Liam Tutty" wrote
in message ...

Does anybody know of any way to do this...I have to compile a
spreadsheet every month for work, and always end up spending hourse
deleting rows where the information is not all present. Is there any
way I can say, Delete every row which has no information in Column E.

This would save me literally about 4 hours at the end of each month.


One way is as follows:

In column F (for example) fill down a numerical series.

Sort on column E, the blank cells should be at the top or bottom depending
on how you sorted the data. This should make it easy to delete the rows.

Sort on column F to return to the original sort order.

Delete column F.


  #4   Report Post  
Posted to microsoft.public.excel.misc
Paul B
 
Posts: n/a
Default "Mass" Delete

Liam, you can use autofilter on the data and select blanks in column E then
select the rows and edit delete row, or you could use a macro like this

Sub Delete_blank()

'Will delete the whole row where there are blank cells in E1:E500

[E1:E500].SpecialCells(xlCellTypeBlanks).EntireRow.Delete

End Sub
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003


"Liam Tutty" wrote
in message ...

Does anybody know of any way to do this...I have to compile a
spreadsheet every month for work, and always end up spending hourse
deleting rows where the information is not all present. Is there any
way I can say, Delete every row which has no information in Column E.

This would save me literally about 4 hours at the end of each month.

Thanks in advance,
Liam.


--
Liam Tutty
------------------------------------------------------------------------
Liam Tutty's Profile:
http://www.excelforum.com/member.php...o&userid=29704
View this thread: http://www.excelforum.com/showthread...hreadid=494156



  #5   Report Post  
Posted to microsoft.public.excel.misc
Liam Tutty
 
Posts: n/a
Default "Mass" Delete


Paul,

Is ther any chance you could talk me through doing this as is menus and
everything else? I'm a total novice.


--
Liam Tutty
------------------------------------------------------------------------
Liam Tutty's Profile: http://www.excelforum.com/member.php...o&userid=29704
View this thread: http://www.excelforum.com/showthread...hreadid=494156



  #6   Report Post  
Posted to microsoft.public.excel.misc
Paul B
 
Posts: n/a
Default "Mass" Delete

Liam,
Select a cell in the first row with you data, then data, filter, autofilter,
this will put some drop down arrows in row 1, click on the one in column E
and select blanks, will be next to the last, then select the row numbers on
the right then edit, delete row, click back on the drop down arrow and
select all.

If you want to use the macro,



To put in this macro, from your workbook right-click the workbook's icon and
pick View Code. This icon is to the left of the "File" menu this will open
the VBA editor, in Project Explorer click on your workbook name, if you
don't see it press CTRL + r to open the Project Explorer, then go to insert,
module, and paste the code in the window that opens on the right hand side,
press Alt and Q to close this window and go back to your workbook and press
alt and F8, this will bring up a box to pick the Macro from, click on the
Macro name to run it. If you are using excel 2000 or newer you may have to
change the macro security settings to get the macro to run. To change the
security settings go to tools, macro, security, security level and set it to
medium
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003


"Liam Tutty" wrote
in message ...

Paul,

Is ther any chance you could talk me through doing this as is menus and
everything else? I'm a total novice.


--
Liam Tutty
------------------------------------------------------------------------
Liam Tutty's Profile:
http://www.excelforum.com/member.php...o&userid=29704
View this thread: http://www.excelforum.com/showthread...hreadid=494156



  #7   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben
 
Posts: n/a
Default "Mass" Delete

Liam

I find this the easiest method.

Select Column E and F5SpecialBlanksOK

EditDeleteEntire Row.


Gord Dibben Excel MVP

On Fri, 16 Dec 2005 09:42:02 -0600, Liam Tutty
wrote:


Does anybody know of any way to do this...I have to compile a
spreadsheet every month for work, and always end up spending hourse
deleting rows where the information is not all present. Is there any
way I can say, Delete every row which has no information in Column E.

This would save me literally about 4 hours at the end of each month.

Thanks in advance,
Liam.

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
how do I delete a worksheet from my workbook DLee New Users to Excel 2 August 15th 05 09:59 PM
In a protected worksheet allow users to delete rows Jason Trivett Excel Worksheet Functions 1 July 12th 05 09:50 AM
Delete row depending on criteria adw223 Excel Discussion (Misc queries) 1 June 30th 05 12:55 AM
How to delete rows when List toolbar's "delete" isnt highlighted? Linda Excel Worksheet Functions 1 May 26th 05 08:39 PM
How to delete blank rows John Mansfield Excel Discussion (Misc queries) 3 April 27th 05 11:48 PM


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