Is it possible to hide a column by either clicking on a unused cell or by defining & pressing a hot key, say F10?
I'm not up at all on any of the coding in Excel so would appreciate any advice, pointers or links.
Thanks
Is it possible to hide a column by either clicking on a unused cell or by defining & pressing a hot key, say F10?
I'm not up at all on any of the coding in Excel so would appreciate any advice, pointers or links.
Thanks
Hi,
F11 will take you into the Visual Basic Environment (VBE).
In the Project Explorer window on the left select your workbook.
From the menu choose 'Insert Module'
In the big code window on the right copy and paste the following macro
Now close the VBE.Please Login or Register to view this content.
Select Tools Macro Macros, Select the HideColumn macro, Choose Options, in the Shortcut key enter say 'h' for hide.
Now whenever you click Ctrl-h the column for the active cell will be hidden.
HTH
Richard Buttrey
RIP - d. 06/10/2022
If any of the responses have helped then please consider rating them by clicking the small star icon below the post.
Hello,
"CTRL+9" - Hides the selected rows.
"CTRL+0" - Hides the selected columns.
"CTRL+(" - Unhide any hidden rows within the selection.
"CTRL+)" - Unhide any hidden columns within the selection.
Rahul
Hi Rahul,
Thanks for reminding me. I'd forgotten that much simpler solution!
Rgds
Hi
Thanks for the quick replies.
Re the code Richard, is their anyway to use that & when CTRL+H (or pref a F key) is hit it will hide the specified column, which in this case is Column O.
Just I want this column hidden fairly quickly at times due to prying staff eyes & then having to click the column 1st, remeber the shortcut combo etc?
Hi,
Yes just use
I'm not aware that you can use the dedicated Fnn keys since they perform actions defined by the applications/computerPlease Login or Register to view this content.
HTH
Hi
That's all working fine, thanks, however it's only working on one sheet, despite copying the code to the next sheet so its all identical?
Looking at Macros again it has added a new Hide Column relating to Sheet64. I have editied that with the same CTRL+H but when CTRL+H is used it only hides the column that has an active cell, not my Column O?
Also is their away to bring the hidden column back using the same CTRL+H or is their another shortcut that will bring them back without having to highlight columns & right clicking?
Thanks
Last edited by simonwilliams; 12-02-2009 at 07:23 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks