Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
"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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do I delete a worksheet from my workbook | New Users to Excel | |||
In a protected worksheet allow users to delete rows | Excel Worksheet Functions | |||
Delete row depending on criteria | Excel Discussion (Misc queries) | |||
How to delete rows when List toolbar's "delete" isnt highlighted? | Excel Worksheet Functions | |||
How to delete blank rows | Excel Discussion (Misc queries) |