close

A column

50
800
Ron
Dave
0
400

i want to delete the entire row if a cell gt; 300

thanks in advance--
barkiny
------------------------------------------------------------------------
barkiny's Profile: www.excelforum.com/member.php...oamp;userid=20397
View this thread: www.excelforum.com/showthread...hreadid=522295Barkiny, you could use autofilter and filter using custom gt;300 then delete
the rows, or you could use a macro like this

Sub Deleterows()
'will delete rows where column A gt;300
Dim lastrow As Long, r As Long
Application.ScreenUpdating = False
lastrow = Cells(Rows.Count, quot;Aquot;).End(xlUp).Row
For r = lastrow To 2 Step -1
If Cells(r, quot;Aquot;) gt; 300 Then
Rows(r).EntireRow.Delete
End If
Next r
Application.ScreenUpdating = True
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; 2003

quot;barkinyquot; gt; wrote in
message ...
gt;
gt; A column
gt;
gt; 50
gt; 800
gt; Ron
gt; Dave
gt; 0
gt; 400
gt;
gt; i want to delete the entire row if a cell gt; 300
gt;
gt; thanks in advance
gt;
gt;
gt; --
gt; barkiny
gt; ------------------------------------------------------------------------
gt; barkiny's Profile:
gt; www.excelforum.com/member.php...oamp;userid=20397
gt; View this thread: www.excelforum.com/showthread...hreadid=522295
gt;

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

    software

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