View Single Post
 
Old 11-21-2013, 05:09 PM
BobBridges's Avatar
BobBridges BobBridges is offline Windows 7 64bit Office 2010 32bit
Expert
 
Join Date: May 2013
Location: USA
Posts: 700
BobBridges has a spectacular aura aboutBobBridges has a spectacular aura about
Default

I'd never used that particular value of SpecialCells; sounds like just the ticket.

Joflow, the number of incoming worksheets may change every time; but since the program is doing the importing, surely it can count them as it happens?

But if the headers are all the same, this should work too:
Code:
Set so = TheSubjectWorksheet
jr = 1
val1 = so.Cells(jr, 1).Value 'column header for col A
Do
  jr = jr + 1
  Loop While so.Cells(jr, 1).Value = val1
Range(so.Cells(2, 1), so.Cells(jr - 1, 1).EntireRow.Delete
(I haven't testing this code; something like it should be right, though.)
Reply With Quote