How to hide/show columns based on a selection from a dropdown list in excel

Wesley Butler 0 Reputation points
2024-01-09T07:33:53.8366667+00:00

Hi there

I have an excel file that has tasks that are listed in a drop-down list. Each task has multiple columns that need to be populated by managers who are on site in remote regions . What I need to happen is to get the columns associated with the task that has been selected to show and all the others to be hidden. Then on selecting the next task, the associated columns with the newly selected task are shown and the others hidden - so and and so forth. Ideally the column show/hide should be effected on the selection of the task from the drop down list. I tried using Case in vba but isn't working correctly. If anyone could assist or share suggestions I would be super grateful.

Microsoft 365
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
5,770 questions
Excel Management
Excel Management
Excel: A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.Management: The act or process of organizing, handling, directing or controlling something.
1,906 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Emi Zhang-MSFT 30,031 Reputation points Microsoft External Staff
    2024-01-10T01:37:15.6466667+00:00

    Hi,

    You can try to create a dependent dropdown list and hide the data in a hidden Worksheet.

    I suggest you refer to this support article and try to create the dependent dropdown list:

    https://exceljet.net/articles/dependent-dropdown-lists

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.

    Just checking in to see if the information was helpful. Please let us know if you would like further assistance.


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.