How to get max number of items in a slicer list box
I've been given a workbook that has a few slicer controls (They look like slicer controls) on the first sheet. I am not familiar with slicer. They are both list boxes and the two lists I'm interested in are the state selection list and the county selection list. When I select a state in the state list, it brings up all of the counties in that state in the county list. Then I select a county and the screen updates with that county information. I need to write a program that loops through all states and all counties. The states and counties are listed on another worksheet and have sequential numbers associated with them. So there are 50 possible states and any number of counties per state. How can I get the maxiumum number of counties for that state so I can use that number in my loop? When I right click the state control it tells me where the state values are coming from (Another worksheet -- Cell Link "E5"). Same with counties. If I query the county value in the immediate window it only returns the value of the county. I need to access the list of counties for that state so that I can loop through them. Any ideas?