Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Sebastion Anderson   on Mar 01 In MS Office Category.

  
Question Answered By: Mona Wagner   on Mar 01

Try this:

Sub DelSomeRows()
DelRowsWith (15)
DelRowsWith (16)
DelRowsWith (25)
End Sub

Sub DelRowsWith(x)
Set MyRange = Intersect _
(ActiveSheet.Range("D:D"), ActiveSheet.UsedRange)
For Each MyCell In MyRange
If MyCell.Value = x Then
MyCell.EntireRow.Delete Shift:=xlUp
End If
Next
End Sub

Share: 

 

This Question has 4 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on select cells based on 3 criteria and delete rows Or get search suggestion and latest updates.


Tagged: