View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tony P.[_3_] Tony P.[_3_] is offline
external usenet poster
 
Posts: 5
Default Delete Rows - Must be dynamic

Beautiful! Thank you!!!!!!!

"bpeltzer" wrote:

Rows("1:1").Select
Range(Selection, Selection.End(xlDown).Offset(-1, 0)).Delete

"Tony P." wrote:

Okay, I am self taught so bear with me while I try to explain. I pull
data files from a retailer's system that come back with header information.
The header can take up anywhere from 4-50+ rows. Column A is always blank in
the data file header. I am trying to write a macro that deletes these data
file headers without deleting my spreadsheet column headers. Here is what I
have so far, but this deletes my column headers as well:

Rows("1:1").Select
Range(Selection, Selection.End(xlDown)).Delete

I know there has to be a way to make the selection go back up one row before
I delete but I sure cannot figure out how. Any help is much appreciated!

Tony