Closed Thread
Results 1 to 16 of 16

VBA to hide columns based on input date range

Hybrid View

  1. #1
    Registered User
    Join Date
    03-25-2014
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: VBA to hide columns based on input date range

    Hi Bernie.

    This unfortunately doesn't seem to work. When i run the macro over the sheet it hides all the columns immediately.

    Some more information:
    - the format for row 17 is custom "mmm yy" with the first cell being 1/7/2008 and the =EDATE+1 formula carried across from there (if that makes any difference?)
    - I need the columns to unhide when the range is changed (unsure if this makes a difference to your code)
    - unsure if it will matter if the date range is say 1/7/12 to 30/6/13 given the second date isn't on the first of the month (as is the case with row 17)

    Thanks.

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,346

    Re: VBA to hide columns based on input date range

    Are the values in D3 and D4 actual dates? Can you post a file that has nothing but row 17? The code works fine in my test workbook..... The code can be run anytime D3 or D4 changes, but let's get the bugs worked out first.
    Bernie Deitrick
    Excel MVP 2000-2010

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Macro to hide columns in a range based on one cells date value
    By Crawfinator1 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-16-2013, 12:59 AM
  2. [SOLVED]Hide Rows and Columns Based on User Input
    By thesteve in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-31-2013, 01:32 PM
  3. [SOLVED] Hide Columns based on date
    By Blue Fishey in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-15-2012, 12:28 AM
  4. [SOLVED] hide columns based on date
    By mattmorris in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-26-2012, 05:10 AM
  5. [SOLVED] Hide columns based on cell value - Unable to set hidden range property of Range Class
    By trillium in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-13-2012, 11:13 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