Dynamically chart series

tourgis2000

New Member
Joined
Sep 3, 2008
Messages
48
Hi,

I have calculated data (the column and row headings are calculated as well) similar to this for which I need to create an automatically updating chart.

<script language="JavaScript" src="http://www.interq.or.jp/sun/puremis/colo/popup.js"></script><center><table align="center" cellpadding="0" cellspacing="0"><tbody><tr><td style="border-top: 0.5pt solid rgb(0, 0, 0); border-left: 0.5pt solid rgb(0, 0, 0); border-right: 0.5pt solid rgb(0, 0, 0);" colspan="7" bgcolor="#0c266b"><table width="100%" align="center" border="0"><tbody><tr><td align="left">Microsoft Excel - test.xlsm</td><td style="font-size: 9pt; color: rgb(255, 255, 255); font-family: caption;" align="right">___Running: 12.0 : OS = </td></tr></tbody></table></td></tr><tr><td style="border-left: 0.5pt solid rgb(0, 0, 0); border-right: 0.5pt solid rgb(0, 0, 0); height: 25px;" colspan="7" bgcolor="#d4d0c8"><table valign="MIDDLE" width="100%" align="center" border="0"><tbody><tr><td style="font-size: 10pt; color: rgb(0, 0, 0); font-family: caption;">(F)ile (E)dit (V)iew (I)nsert (O)ptions (T)ools (D)ata (W)indow (H)elp (A)bout</td><td valign="center" align="right"><form name="formCb755237"><input onclick='window.clipboardData.setData("Text",document.formFb078704.sltNb935705.value);' value="Copy Formula" name="btCb873980" type="button"></form></td></tr></tbody></table></td></tr><tr><td style="border-left: 0.5pt solid rgb(0, 0, 0); border-right: 0.5pt solid rgb(0, 0, 0);" colspan="7" bgcolor="white"><table border="0"><tbody><tr><form name="formFb078704"></form><td style="width: 60px;" align="middle" bgcolor="white"><select onchange="document.formFb078704.txbFb426622.value = document.formFb078704.sltNb935705.value" name="sltNb935705"><option value="3" selected="selected">A1</option></select></td><td width="3%" align="right" bgcolor="#d4d0c8">=</td><td align="left" bgcolor="white"><input size="80" name="txbFb426622"></td></tr></tbody></table></td></tr><tr><td style="border-top: 0.5pt solid rgb(0, 0, 0); border-left: 0.5pt solid rgb(0, 0, 0); border-right: 0.5pt solid rgb(0, 0, 0); background-color: rgb(212, 208, 200);" width="2%" align="middle">
</td><td style="border-top: 0.5pt solid rgb(0, 0, 0); border-right: 0.5pt solid rgb(0, 0, 0); font-size: 10pt; color: black; font-family: menu; background-color: rgb(212, 208, 200);" align="middle"><center>A</center></td><td style="border-top: 0.5pt solid rgb(0, 0, 0); border-right: 0.5pt solid rgb(0, 0, 0); font-size: 10pt; color: black; font-family: menu; background-color: rgb(212, 208, 200);" align="middle"><center>B</center></td><td style="border-top: 0.5pt solid rgb(0, 0, 0); border-right: 0.5pt solid rgb(0, 0, 0); font-size: 10pt; color: black; font-family: menu; background-color: rgb(212, 208, 200);" align="middle"><center>C</center></td><td style="border-top: 0.5pt solid rgb(0, 0, 0); border-right: 0.5pt solid rgb(0, 0, 0); font-size: 10pt; color: black; font-family: menu; background-color: rgb(212, 208, 200);" align="middle"><center>D</center></td><td style="border-top: 0.5pt solid rgb(0, 0, 0); border-right: 0.5pt solid rgb(0, 0, 0); font-size: 10pt; color: black; font-family: menu; background-color: rgb(212, 208, 200);" align="middle"><center>E</center></td><td style="border-top: 0.5pt solid rgb(0, 0, 0); border-right: 0.5pt solid rgb(0, 0, 0); font-size: 10pt; color: black; font-family: menu; background-color: rgb(212, 208, 200);" align="middle"><center>F</center></td></tr><tr><td style="border-top: 0.5pt solid rgb(0, 0, 0); border-left: 0.5pt solid rgb(0, 0, 0); font-size: 10pt; color: rgb(0, 0, 0); font-family: menu; background-color: rgb(212, 208, 200);" width="2%" align="middle"><center>1</center></td><td style="border-style: solid; border-color: rgb(0, 0, 0) rgb(212, 208, 200) rgb(212, 208, 200) rgb(0, 0, 0); border-width: 0.5pt; font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: right;"> </td><td style="border-top: 0.5pt solid rgb(0, 0, 0); border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: left;">Balloons</td><td style="border-top: 0.5pt solid rgb(0, 0, 0); border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: left;">Flags</td><td style="border-top: 0.5pt solid rgb(0, 0, 0); border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: left;">Cushions</td><td style="border-top: 0.5pt solid rgb(0, 0, 0); border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: left;">Pillows</td><td style="border-top: 0.5pt solid rgb(0, 0, 0); border-right: 0.5pt solid rgb(0, 0, 0); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: left;">Stickers</td></tr><tr><td style="border-top: 0.5pt solid rgb(0, 0, 0); border-left: 0.5pt solid rgb(0, 0, 0); font-size: 10pt; color: rgb(0, 0, 0); font-family: menu; background-color: rgb(212, 208, 200);" width="2%" align="middle"><center>2</center></td><td style="border-left: 0.5pt solid rgb(0, 0, 0); border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: left;">Blue</td><td style="border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: right;">1</td><td style="border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: right;">3</td><td style="border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: right;">6</td><td style="border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: right;">0</td><td style="border-right: 0.5pt solid rgb(0, 0, 0); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: right;">1</td></tr><tr><td style="border-top: 0.5pt solid rgb(0, 0, 0); border-left: 0.5pt solid rgb(0, 0, 0); font-size: 10pt; color: rgb(0, 0, 0); font-family: menu; background-color: rgb(212, 208, 200);" width="2%" align="middle"><center>3</center></td><td style="border-left: 0.5pt solid rgb(0, 0, 0); border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: left;">Red</td><td style="border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: right;">3</td><td style="border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: right;">5</td><td style="border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: right;">2</td><td style="border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: right;">1</td><td style="border-right: 0.5pt solid rgb(0, 0, 0); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: right;">0</td></tr><tr><td style="border-top: 0.5pt solid rgb(0, 0, 0); border-left: 0.5pt solid rgb(0, 0, 0); font-size: 10pt; color: rgb(0, 0, 0); font-family: menu; background-color: rgb(212, 208, 200);" width="2%" align="middle"><center>4</center></td><td style="border-left: 0.5pt solid rgb(0, 0, 0); border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: left;">Green</td><td style="border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: right;">7</td><td style="border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: right;">0</td><td style="border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: right;">3</td><td style="border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: right;">2</td><td style="border-right: 0.5pt solid rgb(0, 0, 0); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: right;">4</td></tr><tr><td style="border-top: 0.5pt solid rgb(0, 0, 0); border-left: 0.5pt solid rgb(0, 0, 0); font-size: 10pt; color: rgb(0, 0, 0); font-family: menu; background-color: rgb(212, 208, 200);" width="2%" align="middle"><center>5</center></td><td style="border-left: 0.5pt solid rgb(0, 0, 0); border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: left;">Yellow</td><td style="border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: right;">0</td><td style="border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: right;">7</td><td style="border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: right;">5</td><td style="border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: right;">0</td><td style="border-right: 0.5pt solid rgb(0, 0, 0); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: right;">5</td></tr><tr><td style="border-top: 0.5pt solid rgb(0, 0, 0); border-left: 0.5pt solid rgb(0, 0, 0); font-size: 10pt; color: rgb(0, 0, 0); font-family: menu; background-color: rgb(212, 208, 200);" width="2%" align="middle"><center>6</center></td><td style="border-left: 0.5pt solid rgb(0, 0, 0); border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: left;">Orange</td><td style="border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: right;">5</td><td style="border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: right;">5</td><td style="border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: right;">8</td><td style="border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: right;">3</td><td style="border-right: 0.5pt solid rgb(0, 0, 0); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: right;">2</td></tr><tr><td style="border-top: 0.5pt solid rgb(0, 0, 0); border-left: 0.5pt solid rgb(0, 0, 0); font-size: 10pt; color: rgb(0, 0, 0); font-family: menu; background-color: rgb(212, 208, 200);" width="2%" align="middle"><center>7</center></td><td style="border-left: 0.5pt solid rgb(0, 0, 0); border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: left;">White</td><td style="border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: right;">2</td><td style="border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: right;">6</td><td style="border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: right;">0</td><td style="border-right: 0.5pt solid rgb(212, 208, 200); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: right;">7</td><td style="border-right: 0.5pt solid rgb(0, 0, 0); border-bottom: 0.5pt solid rgb(212, 208, 200); font-size: 11pt; vertical-align: bottom; color: rgb(0, 0, 0); font-family: Calibri; background-color: rgb(255, 255, 255); text-align: right;">3</td></tr><tr><td style="border-style: solid; border-color: rgb(128, 128, 128) rgb(0, 0, 0) rgb(0, 0, 0); border-width: 0.5pt; background-color: rgb(212, 208, 200);" colspan="7"><table valign="TOP" width="100%" align="left"><tbody><tr><td style="border-style: solid; border-color: rgb(128, 128, 128) rgb(0, 0, 0) rgb(0, 0, 0); border-width: 0.5pt; width: 120pt; background-color: rgb(255, 255, 255);" align="left">Sheet2</td><td> </td></tr></tbody></table></td></tr></tbody></table>
[HtmlMaker 2.42] To see the formula in the cells just click on the cells hyperlink or click the Name box
PLEASE DO NOT QUOTE THIS TABLE IMAGE ON SAME PAGE! OTHEWISE, ERROR OF JavaScript OCCUR.</center>

The chart should update if the data is filtered; so if a user doesn't want to see the 'orange' row they can filter the data accordingly. There is a finite number of rows and columns in the range but sometimes there will be less data. I have tried to convert the data to a table and that works quite well except the legend keys persist: so if there is no data for pillows and stickers the legends still appear and have to be removed manually. Also, there seems to be a bug in Excel 2007 whereby the removal of a chart linked to table data causes a persistent error message to appear.
I know that I need to created a named range for the data series using OFFSET, and I have also read that I need to refresh this formula using VBA but I am now very confused and none of my attempts quite work. Any help would be much appreciated.

Thanks in advance,

Martin
 
Hi Jon,

I thought I was going mad! I searched here using every term I could remember, even 'automagic' and it turned out to be one of your own! Synchronicity at work: Jung would be proud.

Many thanks for your help,

Martin
 
Upvote 0

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Forum statistics

Threads
1,215,972
Messages
6,128,027
Members
449,414
Latest member
sameri

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