+ Reply to Thread
Results 1 to 6 of 6

How to Hide Columns based on Two Drop Down Menus

Hybrid View

  1. #1
    Registered User
    Join Date
    12-20-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    3

    How to Hide Columns based on Two Drop Down Menus

    Hi,

    I have a spreadsheet which I would like to hide columns based on two sets of criteria contained in drop down menus.

    I have two drop down menus, one has month (Jan-Dec) in cell A2 and one has year (12, 13, 14) in cell B2.

    The months run in columns D4 to BV4 with a space column in between each month e.g. column D = Jan-12, column E = splitter, column F = Feb-12.

    I would like users to be able to filter to show only a specific month and year based on choices made in the two drop down menus.

    I have attempted to find an answer in forums but as I am new to VBA I am struggling and I am not sure if it works using drop down menus? Any help would be greatly appreciated!

    Thank you!
    Last edited by MILCAL3; 12-20-2011 at 12:20 PM.

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: How to Hide Columns based on Two Drop Down Menus

    This can be done using custom scroll (spin button) or using lookup and match functions... would suggest you to upload the sample file with dummy data. Thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), dilipandey@gmail.com

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: How to Hide Columns based on Two Drop Down Menus

    It would be good if you attach a sample workbook.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  4. #4
    Registered User
    Join Date
    12-20-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: How to Hide Columns based on Two Drop Down Menus

    Attached is a dummy file. Thank you!

    Sample File.xls

  5. #5
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: How to Hide Columns based on Two Drop Down Menus

    hi MILCAL3, VB option, please check attachment
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    12-20-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: How to Hide Columns based on Two Drop Down Menus

    Thank you that worked perfectly for the purpose I needed it for!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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