Auto Hide Columns and/or Rows using VBA based on cell value (validation list)

  • My version 3 works fine for me, I wouldn't have attached without testing!

  • Hi Roy,

    Not specifically the week numbers. I found in the latest version that the main body of the sheet locks out merging cells and I thought it was something you had imposed intentionally. Either way it's for the best so that the end users don't go around merging everything (as they tend to do) and messing up the code.


  • My code only hides and displays rows & columns, it doesn't change Merged Cells.. I formatted the grid of "day" cells as a Table and cells within a Table cannot be merged. I was planning to use other Table features.

  • I see, that makes much more sense.

    Thanks for the clarification. Still works like a charm as far as I'm concerned. Out of curiosity, what other table features were you planning on using?

  • This is similar to a staff tracker that I created for work, but I didn't have the daily view in mine. I'd been meaning to add this and your post prompted me to have a go. I thought of adding a dashboard with a summary for staff members, in which a Table would help create the formulas.

  • Hello Roy,

    Like your built-in calendar feature ...

    Just out of curiosity ... Could selecting a month in cell E1 ... be reflected in your Column D ... Start and End Date ...?


    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Change the Worksheet Change code to this:

    You can now delete the button because the code will run automatically when the month is selected or a range of dates entered

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!