+ Reply to Thread
Results 1 to 8 of 8

Macro to delete Duplicate headers after row 10 and 8 rows below this

  1. #1
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,725

    Macro to delete Duplicate headers after row 10 and 8 rows below this

    i have data in Col A where i want to delete the rows where these appear again after row 10 and to delete 10 below this i.e from where "Customer ID:" appears and 8 rows below this

    i have tried to write code to do this, but no rows are being deleted

    Please Login or Register  to view this content.

    Your assistance in this regard is most appreciated

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: Macro to delete Duplicate headers after row 10 and 8 rows below this

    Try:
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Macro to delete Duplicate headers after row 10 and 8 rows below this

    Try changing the '=' to 'like' as below in your code

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,725

    Re: Macro to delete Duplicate headers after row 10 and 8 rows below this

    Thanks very much Mumps1

    How does the code supplied know that it must start from row 11 and take 8 rows below ?

  5. #5
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: Macro to delete Duplicate headers after row 10 and 8 rows below this

    The macro looks for the second occurrence of the text "Customer ID" in column A and starts deleting from that row until the last row with data.

  6. #6
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,725

    Re: Macro to delete Duplicate headers after row 10 and 8 rows below this

    Thanks for the explanation Mumps1

  7. #7
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,725

    Re: Macro to delete Duplicate headers after row 10 and 8 rows below this

    Thanks for the help, maniacb

  8. #8
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: Macro to delete Duplicate headers after row 10 and 8 rows below this

    My pleasure.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] dynamic vba code to delete duplicate headers, blank headers and blank columns
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-14-2017, 02:27 PM
  2. Macro Delete Duplicate Rows with Exception
    By smmeader in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-20-2012, 12:37 AM
  3. Macro to Filter and delete Duplicate rows
    By Roop in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-28-2010, 08:26 PM
  4. [SOLVED] Delete Duplicate Rows Macro Question
    By elfmajesty in forum Excel General
    Replies: 2
    Last Post: 12-02-2010, 08:22 AM
  5. Sum and delete Duplicate Rows VBA MACRO FORMULA
    By ARNO in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-11-2010, 11:56 AM
  6. Delete Duplicate Rows:create a macro
    By LB79 in forum Excel General
    Replies: 1
    Last Post: 09-12-2006, 06:59 AM
  7. Delete Columns with duplicate headers
    By Casey in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-05-2006, 10:10 AM

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