Using multiselect listbox to determine which rows are displayed?

Sarah52181

New Member
Joined
Mar 7, 2012
Messages
19
Hello All,

I currently have a sheet that lists our sales by item by brand. There are 2 tables, one at the top that represents units and another below that to represent dollars.

I'd love to use a multiselect listbox to allow users to choose which brands they want displayed. (If the multiselect listbox won't work for me due to the nature of the output, I could use checkboxes but I don't feel they look as clean.)

My first thought is to write a macro that begins by hiding all data in both tables and then unhides selected rows if the proper brand appears anywhere in column B. I've also created named ranges for my "total" and "header" rows for both tables that I could unhide as a final step in the macro. This would allow me to almost treat the whole page as one data table rather than having to work on both tables separately (keeping up with ranges in the macros when we add new items, etc).

I've used both Form and ActiveX controls before but I can't seem to come up with anything that even gets me close to what I want to do here.

I considered writing a macro to auto filter the data, but I'm not sure how to make my macro reference the other selections so it doesn't just display the brand associated with that one selection. I also worry about keeping the range for the filter selection accurate as we add new items.

If someone could please point me in the right direction it would be much appreciated!
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

Forum statistics

Threads
1,223,897
Messages
6,175,269
Members
452,628
Latest member
dd2

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