LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 683
Default Delete summary rows programmatically

Access developer here with what is probably an age-old question regarding
some Excel manipulation.

I get a spreadsheet periodically that has header information (consistently
13 lines), followed by good flat-file-type data (number of lines varies),
followed by total information (two lines). I need to strip out the header &
total rows so I can import the normalized data into Access.

I wrote an Auto_Open macro in another spreadsheet that opens this one,
removes the top 13 lines, Home, Ctrl-DownArrow to get to the last populated
row, select the row, up arrow once, deletes the two rows, then saves the file
as a CSV for import into my Access table for long-term storage & analysis.

The header removal is easy, because I just remove the first 13 lines. When I
record a macro using Ctrl-ArrowDown to get to the end and then delete the
last two lines, however, the macro stores the row numbers, but I need the row
numbers to be relative to the last populated row, not a specific number.

I know could just import them into Access and delete them there, but I would
prefer to strip them out in my macro or VBA first.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I delete rows programmatically based on certain criteria? nt_artagnian[_2_] New Users to Excel 2 March 8th 07 03:56 AM
How can I delete rows programmatically based on certain criteria? nt_artagnian[_2_] Excel Worksheet Functions 1 March 7th 07 05:48 PM
How can I delete rows programmatically based on certain criteria? nt_artagnian[_2_] Excel Programming 1 March 7th 07 05:31 PM
How to delete programmatically a pivotcache? FCS Excel Programming 0 August 30th 06 03:11 PM
delete row programmatically Pat Excel Programming 2 September 2nd 04 09:11 PM


All times are GMT +1. The time now is 12:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"