View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Macro, delete rows that meet criteria

Hi Scott,

Try:

'=============
Public Sub Tester()

On Error Resume Next
Columns(2).SpecialCells(xlCellTypeBlanks).EntireRo w.Delete
On Error GoTo 0

End Sub
'<<=============

---
Regards,
Norman


"Scott Wagner" wrote in message
...
I have a project coming up that one aspect will require a macro to remove
certain rows in a spreadsheet that contain detailed product information
that
really isn't needed. Basically I want to turn a detailed product listing
into a summarized product listing. Example of what I will have is below.

Will start with this:

Line# Qty Marking Description
01 1 A Panelboard (NQOD TYPE)
150A MCB
120Y/208V
02 1 B Panelboard (NQOD TYPE)
200A MCB
120Y/208V
03 1 C Panelboard (I-LINE TYPE)
400A MCB
120Y/208V

Want to end up with this:

Line# Qty Marking Description
01 1 A Panelboard (NQOD TYPE)
02 1 B Panelboard (NQOD TYPE)
03 1 C Panelboard (I-LINE TYPE)

Since the line number appears in a specific cell, lets say B2 then basic
logic is that is cell B2 is empty, delete row B.

Let me know what you think.

Thanks,

Scott