Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Delete duplicate headings

I am wondering if it is possible to write a macro to delete duplicate
heading in a worksheet. The heading is hard coded in a program that I
am converting to excel so the heading is repeated in the worksheet and
I am currently manually deleting the headings so that I can sort and
manipulate the data and I am just repeating the rows at the top when it
is printed for the heading. Please help!

Thanks!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 692
Default Delete duplicate headings

There are dozens of ways to delete rows.

The trick is finding a way to identify each row that you want to delete.

One of the ways is to used code to replace one of the headings with nothing.
But you need to exclude the first row.
Than have code that will select that column, than goto special blanks.
Than delete entire rows.

You can do this manually and have the recorder turned on. This will give
you the code.
But this code will show the exact cell designations. These will most likely
need to be replaced with
variables to work on a changing set of data.

Reply back if this doesn't help, or if you need further help.

Another way is to identify the header, than loop from the last row to row 2.
If the cell is equal to the header, than Rows(x).delete

--
steveB

Remove "AYN" from email to respond
wrote in message
oups.com...
I am wondering if it is possible to write a macro to delete duplicate
heading in a worksheet. The heading is hard coded in a program that I
am converting to excel so the heading is repeated in the worksheet and
I am currently manually deleting the headings so that I can sort and
manipulate the data and I am just repeating the rows at the top when it
is printed for the heading. Please help!

Thanks!



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
How to delete columns with headings but rows are empty Deb[_4_] Excel Worksheet Functions 2 February 24th 10 02:41 PM
How do you delete duplicate addresses, but keep duplicate names? Shelly Excel Discussion (Misc queries) 1 August 28th 06 10:36 PM
How do i combine duplicate column headings Mike Excel Worksheet Functions 1 February 1st 06 08:29 AM
How do I not delete an enitre row when running a duplicate delete. TonygWillfe Excel Programming 1 April 7th 05 07:37 AM
Duplicate headings in pivot table arun Excel Programming 2 July 15th 04 03:26 PM


All times are GMT +1. The time now is 06:50 PM.

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

About Us

"It's about Microsoft Excel"