Sajan
Excel Ninja
Hi,
Could anyone provide any pointers for creating dynamic charts with non-contiguous data?
My data setup is similar to the following:
[pre]
[/pre]
i.e. the header row is row 1
the date row is row 2
the value row is row 3
What I would like to do is create a chart (e.g. line chart) with the dates as the X-axis, and two data series: one for the "A" columns, and the second for the "B" columns.
Based on examples I have seen on this site and elsewhere, I have been able to create dynamic charts where the data is contiguous. i.e. when the resulting data range is one single contiguous range, the chart gets plotted correctly. However, when the data range is selected from non-contiguous cells, I am finding that Excel plots only the first cell.
Essentially, what I am attempting to plot are the following two (dynamically created) series:
"A" series would be the array {1,2,3,4,5}
"B" series would be the array {10,20,30,40,50}
A simplified formula for generating the "A" series is:
=OFFSET($A$3,0,(COLUMN($A$3:INDEX($3:$3,5))-1)*2)
"B" series is:
=OFFSET($A$3,0,(COLUMN($A$3:INDEX($3:$3,5))-1)*2+1)
A simplified formula for generating the "date" values is:
=OFFSET($A$2,0,(COLUMN($A$3:INDEX($3:$3,5))-1)*2)
Any help will be very much appreciated.
thanks,
Sajan.
Could anyone provide any pointers for creating dynamic charts with non-contiguous data?
My data setup is similar to the following:
[pre]
Code:
A B A B A B A B A B
Jan-12 Jan-12 Feb-12 Feb-12 Mar-12 Mar-12 Apr-12 Apr-12 May-12 May-12
1 10 2 20 3 30 4 40 5 50
i.e. the header row is row 1
the date row is row 2
the value row is row 3
What I would like to do is create a chart (e.g. line chart) with the dates as the X-axis, and two data series: one for the "A" columns, and the second for the "B" columns.
Based on examples I have seen on this site and elsewhere, I have been able to create dynamic charts where the data is contiguous. i.e. when the resulting data range is one single contiguous range, the chart gets plotted correctly. However, when the data range is selected from non-contiguous cells, I am finding that Excel plots only the first cell.
Essentially, what I am attempting to plot are the following two (dynamically created) series:
"A" series would be the array {1,2,3,4,5}
"B" series would be the array {10,20,30,40,50}
A simplified formula for generating the "A" series is:
=OFFSET($A$3,0,(COLUMN($A$3:INDEX($3:$3,5))-1)*2)
"B" series is:
=OFFSET($A$3,0,(COLUMN($A$3:INDEX($3:$3,5))-1)*2+1)
A simplified formula for generating the "date" values is:
=OFFSET($A$2,0,(COLUMN($A$3:INDEX($3:$3,5))-1)*2)
Any help will be very much appreciated.
thanks,
Sajan.