+ Reply to Thread
Results 1 to 3 of 3

Automatically Hide Columns

  1. #1
    Registered User
    Join Date
    10-26-2010
    Location
    World
    MS-Off Ver
    Excel 2007
    Posts
    27

    Automatically Hide Columns

    I am trying to automatically hide columns based on dates. I have a set of dates ranging from the beginning of August this year until the end of December 2019. I am trying to hide all columns that are at least a day ahead of the current date. Today on 8/4/13 it would show all columns up until today along with tomorrow 8/5/13.


    8/1/2013 8/2/2013 8/3/2013 8/4/2013 8/5/2013

  2. #2
    Registered User
    Join Date
    08-04-2013
    Location
    Davis, CA
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Automatically Hide Columns

    I think that this would require VBA. You can conditionally make cells appear blank by using conditional formatting, but to actually hide the column you would need to have VBA code that executed when the spreadsheet was opened or when activated via a button or running a macro. Is that what you had in mind?

  3. #3
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Automatically Hide Columns

    Try this:

    Please Login or Register  to view this content.
    Directions for running the routine(s) just supplied

    Copy the code to the clipboard

    Press ALT + F11 to open the Visual Basic Editor.

    Open a macro-enabled Workbook or save your Workbook As Macro-Enabled

    Select “Module” from the Insert menu

    Type "Option Explicit" then paste the code under it

    And, you should be ready to go

    With the cursor between Sub and End Sub press F5 (F8 to Single Step)

    OR

    Press ALT + Q to close the code window.

    Press ALT + F8 then double click on the macro name
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

+ 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] Automatically Hide and Unhide Columns
    By A Parsons in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-03-2013, 01:15 PM
  2. Automatically hide columns and unhide of cell value(s) appear within a range
    By oddinho in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-18-2013, 08:32 PM
  3. Automatically hide/unhinde rows in columns
    By wandaervin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-20-2012, 11:05 AM
  4. Hide Columns automatically based on date
    By chrisjc19 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 12-06-2011, 03:32 PM
  5. [SOLVED] How do I automatically hide columns?
    By PPM at Brackmills in forum Excel General
    Replies: 2
    Last Post: 02-10-2006, 01: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