Line graph with two data sets

Giordano Bruno

Well-known Member
Joined
Jan 7, 2007
Messages
1,352
I have a graph which tracks two sets of percentage values by weeks on the x axis. The data is in two adjacent columns and works well if I have multiple rows of data. I use code to set the data source using a dynamic range. If I remove all rows other than the first, the chart shows two points on week 1 and the other weeks. If I then rerun the data source macro, the chart changes to show only week 1 and the two points for the data. If I then rerun the code, the chart shows weeks 1 and 2 and a line between points 1 and 2.
It seems that the graph has assumed that when there is only a single row, there is only a single series and two weeks rather than the reverse. If anyone can point to a way forward I would be eternally grateful.
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

Forum statistics

Threads
1,223,705
Messages
6,173,996
Members
452,542
Latest member
Bricklin

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