+ Reply to Thread
Results 1 to 4 of 4

dynamic vba code to delete duplicate headers, blank headers and blank columns

  1. #1
    Forum Contributor
    Join Date
    02-11-2014
    Location
    mauritius
    MS-Off Ver
    MS365
    Posts
    1,086

    dynamic vba code to delete duplicate headers, blank headers and blank columns

    Hi All

    Looking for a Dynamic vba code to delete duplicate headers,for blank headers (whether there is data in row 2 or not) blank columns with autofit columns.

    However this is a sample format but should not depend on bold or not bold headers that is invoice another header reading invoiceone of them should be deleted as it will always contain same data in the columns

    Thanks if any can assist

  2. #2
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: dynamic vba code to delete duplicate headers, blank headers and blank columns

    Take a look at the attachment to see if it'll do the trick. It utilizes the following procedure:

    Please Login or Register  to view this content.
    This should remove columns with duplicate or blank headers, then autofit the remaining columns. Give it a look:
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    02-11-2014
    Location
    mauritius
    MS-Off Ver
    MS365
    Posts
    1,086

    Re: dynamic vba code to delete duplicate headers, blank headers and blank columns

    Hi

    It worked but slow on the actual data, on real data of 1000 rows, it takes time , however thank you for assistance

  4. #4
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: dynamic vba code to delete duplicate headers, blank headers and blank columns

    I'm glad I could help! I noticed that it was running a bit slowly on the practice set, as well. Deleting entire columns tends to be a slower operation, unfortunately. I hope it'll do!

+ 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 Columns/Column Headers
    By mbrewer1974 in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 08-04-2016, 02:12 AM
  2. To concatenate column headers if value in rows below is non-blank
    By chibidee in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-17-2015, 06:19 AM
  3. [SOLVED] Delete blank columns with headers
    By kingsp in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-01-2014, 04:26 PM
  4. [SOLVED] Delete All Blank Columns with Sheet that has Headers
    By desertshore in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-12-2013, 06:55 PM
  5. Rank between headers or blank rows
    By beat in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-10-2012, 05:35 AM
  6. Ignoring headers and blank lines while importing
    By Bytor47 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-04-2010, 04:45 PM
  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