Changing selected data in a chart in response to a user selection

MimiM

New Member
Joined
Apr 23, 2018
Messages
24
Hi all

Is the following at all possible?

I have data in a crosstab format, containing dates and values in groups. My idea was to present the data for a specific week based on a user selection from a drop-down list. I attach a sample file - please look under the Adult tab. Ideally, when the user selects 15/02/2019, one line will appear, with the number of people in the relevant bin. when the selection changes to 22/02/2019, the new series should reflect the relevant line.

Please let me know if I'm making sense

Thank you in advance

PS - Apparently I cannot post an attachment. So the layout is below

Date-6-5-4-3-2-1012345678910+TotalAdult WL
15/02/201995474210401121000Period22/02/2019
22/02/201978546100010011000
1/03/2019
8/03/2019
15/03/2019
22/03/2019
29/03/2019
5/04/2019
12/04/2019
19/04/2019
26/04/2019

<tbody>
</tbody>

a line graph covering A1:R13 is below.

Hope this helps - I have highlighted the user's current choice in red
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Hi MimiM,

I have accomplished this both using VBA and Named Ranges. There are some good examples if you google "Excel Dynamic Chart Range based on Cell Value".

For the non-VBA method, use data validation for your dropdown list of dates and the Offset and Match functions to create your named range based on selected date.

Hope that helps,

Doug
 
Upvote 0
Thank you, Doug

I have used data validation for the drop-down list but will obviously need to research the Offset function. Thanks again
 
Upvote 0

Forum statistics

Threads
1,215,375
Messages
6,124,578
Members
449,174
Latest member
chandan4057

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