Filtering Chart with Shading

scgilbert1

New Member
Joined
Nov 15, 2011
Messages
15
Hello,

I have always been interested in the dynamic filtering other programming languages have. I know excel has timeline filters but I am looking more for something like the following charts. Overall, the functionality works as following. The user can use one of the two scrollbars below the charts to filter the view of the top chart. They can see what is being filtered in the bottom chart.

Here is how I created it:
  1. Top chart is based on a filtered range of the base data using the new filter function.
  2. Bottom chart is the full data with the addition of a secondary axis using True/False. False = Visible and True = Not Visible or Filtered. I reduced the gap between bars so it appears as shading.
  3. The two scrollbars return a period with the top scrollbar managing the lower range and the bottom scrollbar managing the upper range.

Overall, it works but I cannot solve the following:
  • The top chart shows blanks for the full data set. I think this is because the filtered output is smaller than the range the chart is looking at. I don't know how to get Excel to ignore the empty cells so the chart condenses to only what is shown.
  • I cannot seem to remove the secondary axis on the bottom chart. When I do, it moves the secondary axis data back to the primary axis so I lose my shading.
  • When I use the scrollbars, the filtered data updates in real time but the charts don't update until I release the scrollbar. It would be nice for the chart to update in real time too.

1669824630204.png
1669824644421.png



Thank you!
 

Attachments

  • 1669824041762.png
    1669824041762.png
    14.6 KB · Views: 8
  • 1669824082142.png
    1669824082142.png
    15.8 KB · Views: 10

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

Forum statistics

Threads
1,224,816
Messages
6,181,141
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