Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 577
Default Code for Deleting all but first row

I have a large data file that changes daily. I have a header row and am using
a filter to copy certain data including the header row to a new worksheet. I
want to then go back and delete all the data that was displayed by the filter
except for the Header row. Does anyone know the code that can do this??
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Code for Deleting all but first row

range(Range("B1"), cells(rows.count,
columns.count)).specialcells(xlCellTypeVisible).en tirerow.delete
--
HTH...

Jim Thomlinson


"Scott" wrote:

I have a large data file that changes daily. I have a header row and am using
a filter to copy certain data including the header row to a new worksheet. I
want to then go back and delete all the data that was displayed by the filter
except for the Header row. Does anyone know the code that can do this??

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 577
Default Code for Deleting all but first row

Thanks Jim. That works great!!

"Jim Thomlinson" wrote:

range(Range("B1"), cells(rows.count,
columns.count)).specialcells(xlCellTypeVisible).en tirerow.delete
--
HTH...

Jim Thomlinson


"Scott" wrote:

I have a large data file that changes daily. I have a header row and am using
a filter to copy certain data including the header row to a new worksheet. I
want to then go back and delete all the data that was displayed by the filter
except for the Header row. Does anyone know the code that can do this??

Reply
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
Deleting row using vb code? hol Excel Discussion (Misc queries) 4 November 30th 07 02:43 PM
VBA Code for Deleting a Row [email protected] Excel Worksheet Functions 3 September 6th 07 03:23 PM
Deleting Code from VBA Noemi Excel Discussion (Misc queries) 1 January 24th 06 08:55 AM
Another code for deleting row gregork Excel Programming 2 July 4th 04 06:29 PM
Deleting code in a file with code.. KimberlyC Excel Programming 3 March 4th 04 09:24 PM


All times are GMT +1. The time now is 02:39 AM.

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"