Shape Visibility based on autofilter results

Mikevirgil

New Member
Joined
Mar 25, 2016
Messages
2
I have 250 uniquely named shapes(dots) on a sheet named after cities. Most of my macros assigned to buttons perform two functions: hide/show individually listed dots and autofilters a range of data related to the dots.

I would like the dots to react (hide/show) based on the results of autofilter results of AY selected by the user. Thy sheet has lots of columns, by AY holds unique values I can use to tie back to the shapes.

The range "ay40:ay2000" is named "CustomDotList", but I really don't want all the rows, just the visible ones.

All shapes/dots will start off hidden
.visible = msoFalse

Then the autofilter will be executed by the user.

Since the autofilter will then have several hidden rows, I only want to wildcard-search ("*Denver*") in the visible cells of AY, and IF I find a 'match' THEN make
shape.("Denver").visable = msoTrue

Then go onto the next one by maybe using ELSE ?

Wildcard-search ("*Fargo*") in the visible cells of AY, and IF I find a 'match' THEN make shape.("Fargo").visable = msoTrue

And so on, and so on, through all 250 dot name options. Then 'end sub'

It's almost like I need a dictionary or array of the visible rows of column AY built, then run listed/looped instring wildcards against the dic/array and have shapes change based on 'finds/matches'

I'm very new to VB and have not been able to write it on my own, nor have I been able to find anything online.

Thank you in advance for any help that can be offered.
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Forum statistics

Threads
1,215,332
Messages
6,124,314
Members
449,153
Latest member
JazzSingerNL

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