Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Update Chart Source (w/macro?)
Hi, It seems when a chart is created in Excel, even if you have '#N/A's in the column, if you have 10 numbers plus, let's say 10 #N/As, you'll get a chart that shows 20 spaces worth of dta. However, the source for the chart changes. One day is might be: =main!$G$8:$G$12, and the next =main!$G$8:$G$115, and the next =main!$G$8:$G$75, etc. I want to use the same chart, and not have any extranneaous spce on the right. If thee are 10 entires, I only want to see 10 entries on the chart, etc. The only solution I have for the moment is very inelegant, which is to create a chart each time with a macro using this code: Code: -------------------- Dim w As String w = Cells(6, 15) Range(w).Select Charts.Add -------------------- where the macro reads from the little 'dim' statement on what range to draw from to *create* the chart. But after fiddling around for a few hours, I could not figure out how to get the 'dim' statement to *revise* the chart. Any ideas? TIA!!! -- tx12345 ------------------------------------------------------------------------ tx12345's Profile: http://www.excelforum.com/member.php...o&userid=24776 View this thread: http://www.excelforum.com/showthread...hreadid=497783 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
I want chart source data to be relative references, not absolute. | Charts and Charting in Excel | |||
Linking Axes Max & Mins to source chart | Charts and Charting in Excel | |||
Update a chart immediately after inputting data into data source | Charts and Charting in Excel | |||
How do I automatically update chart source data links for moved fi | Charts and Charting in Excel | |||
2003 update link when Source open | Excel Worksheet Functions |