I want to automatically hide/unide columns in a worksheet based on the contents of a cell. The cell contains the name of the column that should be hidden. Using the following VBA code, I can get the unhide/hide to work fine, but not sure on how to reference the contents of the cell instead of hardcoding the column to hide/unhide.
The column that I want to hide is defined in cell B12. The contents of cell B12 is currently something like "F" to indicate column F.
Can someone help?
Moderator Edit:
Welcome to the forum, Aegwyn11.
Please notice that [CODE] tags have been added to your post. The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at the top of the page and read Rule #3.
Thanks.
Bookmarks