Hide Column

eliozo

Board Regular
Joined
Oct 22, 2010
Messages
80
Kindly I need your help in this:

I work in a glass industry. I have 12 processes in the plant (Cutting, Edging, Drilling...)
These processes are put in Cells B16 --> B27
I did an excel file for my planning. Each order is a column in Excel (column C till Column ZZ)
And for each order there's an "x" if this order has to pass by the related process in the row.

client 1 client 2 client 3
cutting x x x
Edging x
Drilling x x
...

I need a button that once clicked, asks me what process I need to check (B16 --> B27). Then, it hides all the columns not related to that process clicked. When I say not related, there's no "x" related to the order.

Therefore, I need another click to unhide all columns.

Thank you so much for replying as soon as possible.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
I think a userform would work the best for what you are looking for.
Check out this link, it explains very well how to create one:
https://www.excel-easy.com/vba/userform.html

When you create one, you'll need a "Label" for instructions for the user (it's just a text box that you can type in to put instructions on), you'll also need the same number of check boxes as you have processes, so 12, each one named named after a process. Then you'll also need 2 command buttons on your userform, one for confirmation (like an "OK" button) and one to cancel.

To activate the userform and have it appear on your spreadsheet, you'll need to put it another command button on your worksheet (this one goes directly on the worksheet, not the userform). The website I linked actually has steps on how to do this, as well as the code you'll need to assign it.

To unhide all columns with another button, you'll need another command button inserted somewhere on your sheet with the following code attached to it:

Code:
Sub UnhideAll_Click()
Rows.EntireRow.Hidden = False
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,817
Messages
6,181,149
Members
453,021
Latest member
Justyna P

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