+ Reply to Thread
Results 1 to 7 of 7

Delete repeating heading rows

  1. #1
    Registered User
    Join Date
    05-31-2007
    Posts
    49

    Delete repeating heading rows

    hi

    I have a spreadhseet with multiple headings rows segregating different type of data.

    For example Row 1, Row 50, Ro 60 have headings.

    Row 1 will always have headings. Other rows with headings may be row 50 or 55 or 60 etc.

    I want a VBA code which finds rows which are same as Row 1 and deletes the rows. The rows may be somewhere in middle and the rest of the data should shift up.

    Can you please help me?
    Thanks

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Are the headings exactly the same and the text does not appear within the rest of the data?

    Also, are there any blank rows within the data?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    05-31-2007
    Posts
    49
    Quote Originally Posted by royUK View Post
    Are the headings exactly the same and the text does not appear within the rest of the data?

    Also, are there any blank rows within the data?
    The heading rows are exactly the same.

    There are some blank rows in the data as well. I also need to remove these blank to get correct results from autofilter.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Remove the blank rows, then autofilter for the header. Then delete.

    I can't see why yo need a macro.

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Remove the blank rows - try using Sort, then autofilter for the header. Then delete.

    I can't see why yo need a macro.

  6. #6
    Registered User
    Join Date
    05-31-2007
    Posts
    49
    Quote Originally Posted by royUK View Post
    Remove the blank rows - try using Sort, then autofilter for the header. Then delete.

    I can't see why yo need a macro.
    I know how to use sort and autofilter to find blank rows.

    I need a code to delete duplicate rows and blank rows so that i can use it in my macro so it functions properly.

    I have managed to write code for deleting blank rows, so only need code to delete duplicate rows.

    Thanks

  7. #7
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    The quickest way would be to use AutoFilter, whether with code or manually.

    Attach an example workbook

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1