Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 6
Default HowTo add row to series data

1) insert row with ShiftDown
2) apply new data to the newly emptied cells
3) preserve original chart series range

1) after this code row 2 is empty cells
Excel.Worksheet chart = (Excel.Worksheet)book.Worksheets["Chart Data"];
Excel.Range rngToday = chart.get_Range("A2", "D2");
rngToday.Insert(Excel.XlInsertShiftDirection.xlShi ftDown);

2) this puts todays date into A2
rngToday.NumberFormat = "MM/dd";
rngToday.Value = DateTime.Today;

3) OOPS - the chart data is now A3..A7 because of the insert above

How do I reset the souce data to A2..A6
or
Perhaps I can preserve the original setting when I do the insert
---- insert but don't update cell references

???? What's the best way here






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic data series Tom Ulincy Charts and Charting in Excel 1 July 16th 06 02:13 AM
Macro question Chris Excel Worksheet Functions 12 July 7th 06 01:23 AM
Adding data series to chart via macro JessK Charts and Charting in Excel 1 March 1st 06 11:04 PM
Help PLEASE! Not sure what answer is: Match? Index? Other? baz Excel Worksheet Functions 7 September 3rd 05 03:47 PM
Extending a Chart Data Series from an Array - Can it be done? Jon Peltier Charts and Charting in Excel 4 November 30th 04 03:30 AM


All times are GMT +1. The time now is 08:07 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"