+ Reply to Thread
Results 1 to 6 of 6

Thread: Hiding Columns based on Drop Down list selection

  1. #1
    Registered User
    Join Date
    11-25-2011
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    3

    Hiding Columns based on Drop Down list selection

    Hi all

    I would like to know if it is possible to implement a feature where by certain columns are hidden depending on what is selected from a drop-down list.

    I'm presuming this may be achieved by the selected item affecting the custom views in some form? Also guessing it may take a Macro to get this going. I have installed and used macro's in the past but never written my own.....

    any help appreciated!

  2. #2
    Valued Forum Contributor
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    895

    Re: Hiding Columns based on Drop Down list selection

    You can use such code:


    Columns(Cells(1, 1).Value).Hidden = True
    your drop list in A1 with values

    and with this

    Columns.Hidden = False
    you will unhide all columns
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  3. #3
    Valued Forum Contributor
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    895

    Re: Hiding Columns based on Drop Down list selection

    cancelled post
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  4. #4
    Registered User
    Join Date
    11-25-2011
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Hiding Columns based on Drop Down list selection

    great, thanks for the tip. So do I put this in a macro or in the form itself?

  5. #5
    Valued Forum Contributor
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    895

    Re: Hiding Columns based on Drop Down list selection

    look at atachment
    Attached Files Attached Files
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  6. #6
    Registered User
    Join Date
    11-25-2011
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Hiding Columns based on Drop Down list selection

    great. that should get me started I think. however, I think I may need to use it in conjunction with Data Filters than drop down lists. sorry, my fault for not being clear in my terminology usage

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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.2.0