+ Reply to Thread
Results 1 to 4 of 4

Delete or hide entire column if top cell is blank

  1. #1
    Registered User
    Join Date
    04-09-2014
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    14

    Delete or hide entire column if top cell is blank

    Hi I trying to make a macro that will check the top cell in a table (top cell is always in row 4) and hide the entire column if the cell is blank, then move to the next column and check if the top cells is blank, and hide that column if it is, and so on. The tables are usually less than 50 columns wide so would sufficient to just check the first 50 columns and end the macro.

    Any help is welcome!

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Delete or hide entire column if top cell is blank

    Try this.....
    Please Login or Register  to view this content.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Registered User
    Join Date
    04-09-2014
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    14

    Re: Delete or hide entire column if top cell is blank

    Thank you. I changed the code slightly to count the columns using row 6 be cause that row is guaranteed to have no blank cells and then it works perfectly.

    Please Login or Register  to view this content.

  4. #4
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Delete or hide entire column if top cell is blank

    You're welcome.
    If that takes care of your question, please mark your thread as Solved by selecting Thread Tools (just above your first post) --> Mark thread as solved.
    Moreover you may also click on * (star) to Add Reputation if the solution provided helped you. This is another way to say 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. [SOLVED] Delete entire row if Column C is blank
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-16-2014, 12:03 PM
  2. [SOLVED] Delete entire row if column F is blank
    By ScabbyDog in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-21-2013, 11:03 AM
  3. Replies: 1
    Last Post: 05-10-2012, 04:58 PM
  4. If cell in column B is blank, delete entire row
    By davehunter in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-03-2007, 06:38 AM
  5. [SOLVED] Delete entire rows where there is a blank in column A
    By Chris Hankin in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-11-2006, 05:00 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