+ Reply to Thread
Results 1 to 5 of 5

macro to unhide columns based on Month Selection

  1. #1
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2024
    Posts
    2,891

    macro to unhide columns based on Month Selection

    I have the month and year in Cols C to N

    I only want to show the Column with the Month and Year based on the Month Selection in A2

    It would be appreciated if someone could provide me with code to do this


    I have attached sample data


    Your assistance is most appreciated

  2. #2
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    O365 V2408
    Posts
    15,141

    Re: macro to unhide columns based on Month Selection

    Please Login or Register  to view this content.
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

  3. #3
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2024
    Posts
    2,891

    Re: macro to unhide columns based on Month Selection

    Thanks for your help Sintek

    the code works when I select say June. After I select June and then select say August, I get a run time error

    I have copied code into sheet module


    Kindly test & amend

  4. #4
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    O365 V2408
    Posts
    15,141

    Re: macro to unhide columns based on Month Selection

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2024
    Posts
    2,891

    Re: macro to unhide columns based on Month Selection

    Thanks very much Sintek

    Code works perfectly

+ 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] Hide/Unhide Columns based on Drop-down selection in different tab
    By RashmiD2930 in forum Excel General
    Replies: 18
    Last Post: 08-19-2020, 12:50 PM
  2. help please - hide unhide rows and columns based on drop down selection
    By iamgujju in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 07-01-2019, 10:56 AM
  3. [SOLVED] Print Macro - Hide/Unhide Columns based on Value
    By Cardan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-24-2018, 01:12 PM
  4. Macro to calculate Month to year sales based on month selection
    By chandu356 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-14-2017, 09:58 AM
  5. Hide/Unhide Columns based on Drop-Down Selection
    By Khafez in forum Excel General
    Replies: 21
    Last Post: 09-14-2016, 12:13 PM
  6. [SOLVED] Looking for a Macro to Unhide Columns based on a User's Input
    By Candlelight in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-04-2014, 08:37 AM
  7. macro that will hide/unhide rows based on data validation selection
    By megkim2002 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-18-2012, 10:40 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