Hide or Unhide columns Userform

echan101

New Member
Joined
Feb 1, 2023
Messages
1
Office Version
  1. 2019
Platform
  1. Windows
  2. Web
OK not a question, just a hopefully useful post.

Problem: In Excel, there is no easy way to unhide just one column. Instead you would need to unhide all the columns then rehide anything you don't want.

Solution: Here is an Excel UserForm and accompanying VBA macros that fills this gap.

This macro will hide/unhide columns for a Table or an AutoFilter on the active sheet.

anvilsoup - Excel: Hide or unhide columns

I am sure there are a lot better ways of writing this code (I am not a good coder!) but hopefully it helps - let me know what you think!

2023-02-02 14_01_38-Window.png

 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Unhide 1 column via vba code, Column B in this example:

VBA Code:
Range("B:B").EntireColumn.Hidden = False
 
Upvote 0

Forum statistics

Threads
1,215,634
Messages
6,125,934
Members
449,274
Latest member
mrcsbenson

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top