close

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: www.excelforum.com/member.php...oamp;userid=29704
View this thread: www.excelforum.com/showthread...hreadid=494156HiSub 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, quot;Equot;).End(xlUp).Row
For Lrow = EndRow To StartRow Step -1
If IsError(.Cells(Lrow, quot;Equot;).Value) Then
'Do nothing, This avoid a error if there is a error in the cell

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

End If
Next
End With
With Application
.ScreenUpdating = True
.Calculation = CalcMode
End With
End SubSee also
www.rondebruin.nl/delete.htm

--
Regards Ron de Bruin
www.rondebruin.nlquot;Liam Tuttyquot; gt; wrote in message
...
gt;
gt; Does anybody know of any way to do this...I have to compile a
gt; spreadsheet every month for work, and always end up spending hourse
gt; deleting rows where the information is not all present. Is there any
gt; way I can say, Delete every row which has no information in Column E.
gt;
gt; This would save me literally about 4 hours at the end of each month.
gt;
gt; Thanks in advance,
gt; Liam.
gt;
gt;
gt; --
gt; Liam Tutty
gt; ------------------------------------------------------------------------
gt; Liam Tutty's Profile: www.excelforum.com/member.php...oamp;userid=29704
gt; View this thread: www.excelforum.com/showthread...hreadid=494156
gt;
quot;Liam Tuttyquot; gt; wrote
in message ...
gt;
gt; Does anybody know of any way to do this...I have to compile a
gt; spreadsheet every month for work, and always end up spending hourse
gt; deleting rows where the information is not all present. Is there any
gt; way I can say, Delete every row which has no information in Column E.
gt;
gt; 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.
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 amp; 2003quot;Liam Tuttyquot; gt; wrote
in message ...
gt;
gt; Does anybody know of any way to do this...I have to compile a
gt; spreadsheet every month for work, and always end up spending hourse
gt; deleting rows where the information is not all present. Is there any
gt; way I can say, Delete every row which has no information in Column E.
gt;
gt; This would save me literally about 4 hours at the end of each month.
gt;
gt; Thanks in advance,
gt; Liam.
gt;
gt;
gt; --
gt; Liam Tutty
gt; ------------------------------------------------------------------------
gt; Liam Tutty's Profile:
gt; www.excelforum.com/member.php...oamp;userid=29704
gt; View this thread: www.excelforum.com/showthread...hreadid=494156
gt;

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: www.excelforum.com/member.php...oamp;userid=29704
View this thread: www.excelforum.com/showthread...hreadid=494156Liam,
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 quot;Filequot; 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 amp; 2003quot;Liam Tuttyquot; gt; wrote
in message ...
gt;
gt; Paul,
gt;
gt; Is ther any chance you could talk me through doing this as is menus and
gt; everything else? I'm a total novice.
gt;
gt;
gt; --
gt; Liam Tutty
gt; ------------------------------------------------------------------------
gt; Liam Tutty's Profile:
gt; www.excelforum.com/member.php...oamp;userid=29704
gt; View this thread: www.excelforum.com/showthread...hreadid=494156
gt;
Liam

I find this the easiest method.

Select Column E and F5gt;Specialgt;Blanksgt;OK

Editgt;Deletegt;Entire Row.Gord Dibben Excel MVP

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

gt;
gt;Does anybody know of any way to do this...I have to compile a
gt;spreadsheet every month for work, and always end up spending hourse
gt;deleting rows where the information is not all present. Is there any
gt;way I can say, Delete every row which has no information in Column E.
gt;
gt;This would save me literally about 4 hours at the end of each month.
gt;
gt;Thanks in advance,
gt;Liam.

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()