Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Hpw do I delete multiple empty rows found between filled rows? | Excel Worksheet Functions | |||
Cut filtered rows, paste into next empty row of new sheet, and delete cut rows | Excel Worksheet Functions | |||
Delete rows with numeric values, leave rows with text | Excel Programming | |||
How to delete rows when List toolbar's "delete" isnt highlighted? | Excel Worksheet Functions | |||
Delete every 3rd row, then delete rows 2-7, move info f/every 2nd row up one to the end and delete the row below | Excel Programming |