+ Reply to Thread
Results 1 to 4 of 4

Macro to delete rows from Duplicate Heading in Col D up to first blank row below last num

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

    Macro to delete rows from Duplicate Heading in Col D up to first blank row below last num

    I have data on sheet "Imported Data"

    I have tried to write code to delete rows containing duplicate headings in Col D from row 2 onwards up to the first blank row below the number above last blank row

    I have manually extracted the data to show what it should look like after running the macro-see sheet "Final Result"

    I need my code amended to accomodate my request

    Please Login or Register  to view this content.
    Last edited by Howardc1001; 12-03-2022 at 11:28 AM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,373

    Re: Macro to delete rows from Duplicate Heading in Col D up to first blank row below last

    There's a lot you can do without VBA these days.

    I would be inclined to copy the headers and data you want to a new sheet. Then there is no risk of deleting or corrupting any data.

    Headers:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Data:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


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

    Re: Macro to delete rows from Duplicate Heading in Col D up to first blank row below last

    Thanks Trevor. This is very useful

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,373

    Re: Macro to delete rows from Duplicate Heading in Col D up to first blank row below last

    You're welcome.

+ 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] delere rows of stocks where column D is blank
    By makinmomb in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-20-2022, 08:41 AM
  2. Sum a column if there is a duplicate in another and remove blank rows
    By JodiBlack in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-07-2021, 11:33 PM
  3. [SOLVED] Delete rows on basis of duplicate & blank cell
    By sanjuss2 in forum Excel General
    Replies: 3
    Last Post: 09-10-2015, 06:38 AM
  4. Replies: 1
    Last Post: 04-25-2015, 11:53 AM
  5. [SOLVED] Transpose Duplicate rows into columns including blank cells
    By BJPhil in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-07-2014, 12:08 PM
  6. [SOLVED] Compare Rows, Delete duplicate values, Sum values but Retain blank rows
    By chancw in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-24-2013, 07:38 AM
  7. How to create a macro to insert blank rows and copy data into blank rows?
    By zodiack101 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-29-2013, 01:18 PM

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