Creating a Double Axis Dynamic Chart with Four Tables and a Drop Down Selection

tmed834

New Member
Joined
Nov 26, 2017
Messages
3
Hello, this is my first post! Pleasure to join the forum.

So I am trying to create a double axis chart, one will be a bar chart and the other will be a line chart. I have four locations I want to do this for, but if I have the data for all four countries then the visuals will be way too crammed. Here is some of the data below:

DateAustralia ConversionsAustralia CPAHong Kong ConversionsHong Kong CPANew Zealand ConversionsNew Zealand CPASingaporeConversionsSingapore CPA
8/1/20091027.259415.5675423.4875219.514285714
8/2/20091131.68181818167.57447.4451023.264

<colgroup><col><col><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>


And here is the chart for just one of the tables (one table for each country).

33fbaef.jpg


Essentially, if I can have a drop down list above the legend, where I can choose either Australia, Singapore, Hong Kong or New Zealand, then someone viewing the chart can have all the data here and select accordingly.

Thanks, and apologies if I broke any rules in how I posted. I read the rules, but not entirely. I will fix the thread if there is something blatantly wrong.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
I haven't seen your complete data set. From what you show in the one chart, you might see better separation of the blue bars and the red line if you uses a single 0–70 vertical scale.

A different, separate cell range from the original data range is used for the chart source data.

I plotted some random or dummy data in T5:AB66. The headers were in row 5, dates in column T, SG CPAs in column AB.

The chart source data was in B5:D66. Column B just duplicates the dates in column T.

I put a Data Validation dropdown box in G3. Settings were for Allow: List; Source: 1. Australia,2. Hong Kong,3. New Zealand,4. Singapore
The numbers in the Data Validation Source list allow us to copy the values from the original data block to the charted data block using a CHOOSE formula rather than an INDEX+MATCH, VLOOKUP, or nested IF formula.

uP28g6l.png


The charted data:

B
C
D
5
DateNZ ConversionsNZ CPA
6
08/01/20091147.905
7
08/02/20091131.708
8
08/03/2009348.196
9
08/04/2009128.153

<tbody>
</tbody>

Formula in C5, copied to the right and downward:
=CHOOSE(LEFT($G$3),U5,W5,Y5,AA5)

My example file is available at https://www.dropbox.com/s/vfv615swlgvtkf3/dynamic_chart_for_tmed834.xlsx?dl=0
 
Last edited:
Upvote 0
I haven't seen your complete data set. From what you show in the one chart, you might see better separation of the blue bars and the red line if you uses a single 0–70 vertical scale.

A different, separate cell range from the original data range is used for the chart source data.

I plotted some random or dummy data in T5:AB66. The headers were in row 5, dates in column T, SG CPAs in column AB.

The chart source data was in B5:D66. Column B just duplicates the dates in column T.

I put a Data Validation dropdown box in G3. Settings were for Allow: List; Source: 1. Australia,2. Hong Kong,3. New Zealand,4. Singapore
The numbers in the Data Validation Source list allow us to copy the values from the original data block to the charted data block using a CHOOSE formula rather than an INDEX+MATCH, VLOOKUP, or nested IF formula.

uP28g6l.png


The charted data:

B
C
D
5
DateNZ ConversionsNZ CPA
6
08/01/20091147.905
7
08/02/20091131.708
8
08/03/2009348.196
9
08/04/2009128.153

<tbody>
</tbody>

Formula in C5, copied to the right and downward:
=CHOOSE(LEFT($G$3),U5,W5,Y5,AA5)

My example file is available at https://www.dropbox.com/s/vfv615swlgvtkf3/dynamic_chart_for_tmed834.xlsx?dl=0

Amazing!!!!!!! This is exactly what I wanted. I never really used the data validation tool or the choose formula at my last job, so I need some more practice with those. But I will use your example and study it so I can replicate this in the future. But your explanation is great.

Thanks so much!
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,246
Members
449,075
Latest member
staticfluids

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