Multiple Checkboxes to Hide/Unhide Rows and/or Columns based on cell values

gravy258

New Member
Joined
Feb 18, 2013
Messages
1
Hi Everyone,

I am new to the board and with minimal VBA experience, hoping that someone can help me with the following:

I have a sheet with hundreds of rows and columns, which I want the end-user to easily be able to use checkboxes to hide/unhide any columns or rows they wish based on three sets of values in the column headers and row headers.

Please see the simple example below.. I have tried several different pieces of code for the checkboxes but nothing has worked for both rows and columns yet.

For instance, if a user unchecked all boxes except for "Apples" and "3", it would only display columns with "3" in row 5 and only display rows with "Apples" in column A.

Any help would be greatly appreciated. Thanks to all!
Fruits
Letters
Numbers
Checkbox - Apples
CB - A
CB - 1
Checkbox - Oranges
CB - B
CB - 2
Checkbox - Bananas
CB - C
CB - 3
CB - 4
1
2
3
4
1
2
3
4
1
2
3
4
Apples
a
a
a
a
b
b
b
b
c
c
c
c
Apples
Oranges
Bananas
Bananas
Bananas
Apples
Oranges
Orange
Apples
Bananas
Oranges
Oranges

<TBODY>
</TBODY>
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Forum statistics

Threads
1,216,077
Messages
6,128,684
Members
449,463
Latest member
Jojomen56

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