+ Reply to Thread
Results 1 to 6 of 6

Deleting blank columns/macro

  1. #1
    Forum Contributor
    Join Date
    03-24-2010
    Location
    North West UK
    MS-Off Ver
    2013
    Posts
    112

    Deleting blank columns/macro

    Hi,

    I'm looking for a macro where it will delete all blank columns. I have to dump a lot of raw data in an excel file and sort it but it's taking absolutely ages to select each column and delete it, I'm looking for a quick fix.

    Over to you boffins!

    Thanks,
    Lew

  2. #2
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Deleting blank columns/macro

    Can you attach a small sample workbook and explain what you need.

  3. #3
    Forum Contributor
    Join Date
    03-24-2010
    Location
    North West UK
    MS-Off Ver
    2013
    Posts
    112

    Re: Deleting blank columns/macro

    I can but the raw data isn't standard so it's not something that I could record a macro to do as the empty columns change, I'm just looking for a piece of code that could, for example, look at the whole sheet and remove every column that has no data in any cells in columns.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,865

    Re: Deleting blank columns/macro

    try this:

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Forum Contributor
    Join Date
    03-24-2010
    Location
    North West UK
    MS-Off Ver
    2013
    Posts
    112

    Re: Deleting blank columns/macro

    Perfect, that's going to help me out a lot.

    Thank you
    Lew

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,865

    Re: Deleting blank columns/macro

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. Deleting All Blank Columns under Row 1
    By Reztip717 in forum Excel General
    Replies: 1
    Last Post: 03-04-2014, 04:46 PM
  2. [SOLVED] Macro for deleting blank rows?
    By yamadogr1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-29-2014, 01:35 PM
  3. Deleting a blank Columns (with header) in excel 2010
    By gabilk20 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-18-2013, 10:09 PM
  4. Deleting blank cells in columns
    By teja in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-17-2012, 07:58 PM
  5. Macro for Deleting the entire row if first two columns are blank
    By Nithya1987 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-08-2011, 12:24 PM
  6. Excel 2007 : deleting blank (or zero) cells in macro
    By dcincala in forum Excel General
    Replies: 4
    Last Post: 10-18-2010, 12:46 PM
  7. Newbee - deleting blank columns
    By Rednosebob in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-28-2006, 11:00 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