Dynamic Chart based on filter selection

cceber

New Member
Joined
Nov 8, 2008
Messages
2
I have a spreadsheet which contains 1972 rows of data. The spreadsheet contains filters so a user can select to see their specific data (ie, geographic sales region).

The problem is that creating a bar chart of 1972 rows makes it unreadable. So I decided to chart only 30 rows of data. However, now when a user selects their region, it only shows the static 30 rows...meaning it cuts off all data that is in rows 31 through 1972. I'd like the chart to show a dynamic range based on the filter up to a maximum of 30 rows.

I've been reading up on named ranges using offset...but I'm new to this and don't fully understand how to adjust that formula to do what I want. That only seems relevant if I'll be adding more data to my sheet?

Thanks for any help or suggestions!
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
I have created a large spreadsheet doing exactly this.

The way I have accomplished it is to 'copy values' the filtered sheet to another sheet (normally hidden from view). The copy value copies only the selected rows, none of the others.
Now you have your graphs refer to first thirty rows of the the range on the hidden sheet. (I include all the rows, so I need to first establish the row count, and then set the graphs to that count, I have an 'Update' button that the user presses after he has made his filtered selection in order to set all the graphs correctly)
 
Upvote 0
That's a good idea, but I was hoping there would be a way to do this with a dynamic formula or script.
 
Upvote 0
I have not found any way to get a graph out of a filtered range that doesn't inlcude the hidden rows, so that was why a set up the script to do what I describe above. It runs very neatly and quickly.
 
Upvote 0

Forum statistics

Threads
1,215,379
Messages
6,124,605
Members
449,174
Latest member
ExcelfromGermany

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