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.xlShiftDown);

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






0
Eggle (3)
10/4/2006 2:08:01 PM
excel.charting 18370 articles. 0 followers. Follow

0 Replies
1032 Views

Similar Articles

[PageSpeed] 4

Reply:

Similar Artilces:

Mass Data Entry for a Junction Table
On my Junction table we track the employee and what education offerings they have attended. We have found that we have multiple employees attending the same offerings on the same day. (makes sense, if a class is offered one day you will about 20-30 people in that class) Is there any way to simplify the data entry process. Right now on the form the person doing data entry selects the employee, the education offering and the date. This has to be done for each attendee. What would be great would be to create a form that allows you to select a course and a date, and then select mult...

CListCtrl with owner data and tooltip missing problem
I've a CListView derived class with owner data style and report view. My tooltip gets displayed and then overdrawn repeatedly. Traces in my lvn_getdispinfo and ttn_needtext handlers get called repeatedly. Are there known problems with tooltips and owner data? Any Ideas? Thanks, Jeff F ...

Data Type mismatch error 3464 in Dlookup
Here is the code: Private Sub id_Part_AfterUpdate() strFilter = "pm_Part = " & Me!id_Part Me!id_Unit = DLookup("pm_Retail", "Parts", strFilter) End Sub Hi. I am getting error 3464 Data Type mismatch when I run this code. The field id_Unit is on the form and is of the type Currency. The field pm_Retail is in the Parts table and is of the type Currency. The field id_Part is on the form. The field pm_Retail is in the Parts table. This seems simple enough but I can't figure out what the type mismatch is. I would appreciate any sugges...

OWA public folder data does not match actual data
Viewing a public folder calendar through OWA does not match the contents when viewing it through Outlook 2002 or 2003. If I change an existing appointment or add a new appointment, the data shows up but random existing data does not show up in OWA. Running EX2K3 SP2 on Windows 2K3 SP1 Thanks, Brian How many public folder servers do you have? Are they perhaps looking at different replicas? -- Ed Crowley MVP - Exchange "Protecting the world from PSTs and brick backups!" "B.E. Jorgenson" <jorgenson.b@gmail.com> wrote in message news:1163007900.164594.135120@h48g...

Removing $ symbol from imorted data
When I import information from the web eg stock prices etc, some of it comes as $4.25 instead of 4.25. I cannot manipulate the data in this format and I have tried the Format - Cells - Number - Currency - None option but it does not work. Help apppreciated. Thanks Ricardo Try this: =VALUE(MID(A2,2,50)) Andy "Ricardo" <richwhiteoak@hotmail.com> wrote in message news:2a48e01c39233$a9941ef0$a601280a@phx.gbl... > When I import information from the web eg stock prices > etc, some of it comes as $4.25 instead of 4.25. I cannot > manipulate the data in this format and ...

Merging excel office data into a publisher office project(Australi
Having problems when I get to the point in the merge wizard "catalog merge template", with the DOB format to be entered into the membership card that I have made in Publisher. It reverts back to American date format. Could the problem be in the edit record section? All seems to be okay till then. I have checked the regional settings etc., all okay. When I have finished template of merge & highlighted the DOB field gone to language on tool bar and set language it still doesn't work then preview, it has reverted to American. ...

Deleting Rows Automatically using a Text File List
I have a text file list of .jpg files that I want to delete (rows) from Excel. The list has 800+ items in it. Deleting these rows one at a time in Excel (after doing a "find") is terribly time consuming. Does anyone know how to make Excel read my text file and delete the rows with that filename in it (automatically). The filename (listed in the text file) is in a column (in my excel sheet) called "filename". Any help would be most appreciated!!! Seriously! I may have to spend hours on this otherwise! Thank you, Arielle -- mirdonamy ------------------------------...

insert new row doesn't add formula
I have a table A2->M100 In the M Column I have a sum to calculate the total of that row =SUM(A34:N34) for example Now if I want to add a row into that table, I click on the number o the left, that highlights the row then I go insert>>row and that keep the formatting of the cells. BUT it doesn't add the =SUM(A54:N54) in the M column, and so I have ha to edit each cell by hand to get the correct formula. Is there an easier way to add a row and keep fomulas within that row but obviously automatically change the numbers to suit the row -- Message posted from http://www.ExcelForu...

delete row?
need some help on this one. Is there a way to check to see if there is a value or not null for three cells in a row and if there is not, then delete the row? Example: I have sheets of customer information where each row is a different customer (name, address, ect..), but if they do not have a contact number (home, work, cell) i would like to delete them. I'm pretty sure that this can be done via macro, but don't know how. Any and all help is greatly appreciated! Thanks Vince Jason, Thank you very much for your help, I'm playing with your suggestions now. -Vince "J...

Text Overflow into Different Row
Excel allow text to overflow into an adjacent cell as long as it is empty and it is in the same row. How can I make it overflow if it si in a different row? Thank you ...

Array of User define data.
I want to use a typed data of array. Type myType X As Long Y As Long End Type Dim myMatrix(20)(20) As myType But above code is wrong. How to that right VBA coding? Another question. Can I use a Variant array such as dim myVar as Long = 20 Dim myMatrix(myVar) As myType Thanks... I think this is what you mean Dim myarray() As myType ReDim myarray(1 To 20) myarray(1).X = 1 myarray(1).Y = 3 Const cLen As Long = 20 Dim myArray2(cLen) As myType myArray2(20).X = 1 myarray(20).Y = 2 -- HTH Bob Phillips "Cactus [������]" <a@b.com> wrote in mes...

Excel 2003 ODBC Add-in
Where can I download Excel 2003 ODBC Add-In from ? Hi MS no longer delivers this addin with Excel 2003. But check out: http://www.bygsoftware.com/examples/sqlrequest.html http://office.microsoft.com/downloads/2002/xlodbc.aspx -- Regards Frank Kabel Frankfurt, Germany "Excel2003User" <Excel2003User@discussions.microsoft.com> schrieb im Newsbeitrag news:687E3600-63A2-414E-A7B8-5366BE386667@microsoft.com... > Where can I download Excel 2003 ODBC Add-In from ? ...

External Data and Sheet Protection
I have a sheet that runs automatic external web and database queries...I need to protect the sheet from user changes but when I do the automatic updates are not permitted either. Is there a way to permit auto updates and prevent user changes a the same time? THANKS. Untested: Maybe you could have your query put its data in another sheet (hidden, but unprotected). Then use formulas to return the values to the user's worksheet. nbs wrote: > > I have a sheet that runs automatic external web and > database queries...I need to protect the sheet from user > changes but w...

Column Header that moves with Data?
Does anyone know if it is possible, and if so how to have a colum header move with the data? I have a sheet with a ton of data and the list is growing, I would lik to see the column header "float" with the list instead of having t scroll to the top and check it out. thanks for all help -- Message posted from http://www.ExcelForum.com Hi if i'm understanding correctly - click in cell A2 and choose windows / freeze panes to undo it choose window / unfreeze panes Cheers JulieD "wendellarina >" <<wendellarina.19p7jr@excelforum-nospam.com> wrote in mess...

Why does my data disappear?
I make the chart, then start refining (putting the date scale on the left, etc) and the data disappears. I do a right-click, click on Source Data, make the necessary motions, and I still have no data. What am I doing wrong? ...

how to add condition to In Clause?
Greeting, I have a question which is how to list the customers who bought dogs in the first quarter and also bought dog food in the fourth quarter. My query is as follows: SELECT Customer.* FROM Customer WHERE (((Customer.CustomerID) In (SELECT Sale.CustomerID FROM SaleAnimal INNER JOIN Sale ON SaleAnimal.SaleID = Sale.SaleID WHERE DatePart("q",SaleDate) = 1) And (Customer.CustomerID) In (SELECT Sale.CustomerID FROM (SaleItem INNER JOIN Sale ON SaleItem.SaleID = Sale.SaleID ) INNER JOIN Merchandise On Merchandise.ItemID = SaleItem.ItemID W...

Add custom User Defined Function to Report Writer report
Is it possible to do this? I have created a UDF in SQL2005 that returns the value that I want to bring onto a report in GP10's RW. Thanks Les ok.. I think I have learnt since posting that the UDF is a dexterity UDF, not a SQL UDF that Report Writer can reference. If so, forget it.. I'll use a Crystal Report or SQL RS report. Tx Les "LesWright" wrote: > Is it possible to do this? > > I have created a UDF in SQL2005 that returns the value that I want to bring > onto a report in GP10's RW. > > Thanks > > Les You could use VBA to call y...

How to add a picture to an Outlook 2002 signature, without using 'Word as email editor'
We have disabled 'Word as email editor' by group policy. This is essential as we run a Citrix environment and Word as email editor hammers the server processors. However, when I have created a signature with a graphic, it does not work unless 'word as email editor' is enabled. If not, there is just an empty box with a red cross in it. There is a work around where you insert the graphic manually into your email, but this is not a satisfactory solution for users. I'd love to hear any solutions to this. We run Exchange 2003 and Outlook 2002. Cronos ...

Smartlist is returning data from wrong company view
I created a Sql view in a company database and then created a Smartlist. I then copied and pasted the select statement from that view to my other companies and named the view the same. When I execute within Sql, I get accurate data for each company. When I run my Smartlist, the data returned is from the original company no matter what company I am logged in to. In Smartlist Builder, I tried checkmarking "use company database" but it doesn't save. This is 9.0 w/SP3 and I am logged in as 'sa' Hi Mes, When you go into each of the companies for the first time with t...

backup of database with multiple backend data bases
I want to add a button to the main form that backs up 1 (ONLY) of 2 linked databases... It's a bit of an odd condition: the way the project has been set up, it is linked to 2 backend databases; fortunately, all of the tables in one mdb are prefixed [tbeTableName], and in the other: [tboTableName] I only want to backup those tables from the backend mdb [tbe...]; those tables associted with the [tbo...] mdb do not need to be backed-up, nor do those in the front end mdb I am at a complete loss as to where to start, and ANY direction would be greatly appreciated. than...

Data migration from ACT! 10 to CRM 4.0 (hosted)
Hi, Does Data Migration Manager support the above? We need to migrate accounts, contacts and related history and activities from ACT! 10 to CRM 4.0 (which will be partner hosted). Thanks. The Data Migration Manager provides out of box maps for ACT 6. But it should be able to migrate records from ACT 10 too. you need to create/update maps for the entities you need to migrate. One good option may be to start with ACT 6 map and add mappings if there is any unmapped entity/attribute. Thanks, Koushik "The Office Guy" <TheOfficeGuy@discussions.microsoft.com> wrote in message ...

How do I import data from RightFax into an Excel spreadsheet?
I am trying to import data from RightFax into Excel. Any ideas? Thank-you! What is rightFax and can you save the file in RightFax as a text file? Then you can import that text file. Otherwise, send me the file and I will see if I can create a code to import it. See my Excel demos at http://www.geocities.com/excelmarksway - -Mark "Barbie" wrote: > I am trying to import data from RightFax into Excel. Any ideas? > > Thank-you! ...

Import utility for .csv/.xls data into RMS?
Hello: I have recently been tasked with administering the database of several systems at work including Microsft RMS. I see there is a native export feature in the admin utility to draw data out of the SQL DB, but no such Import feature. I have a csv of several hundred Customer's I would like to bulk import into RMS. Is this QS import utility able to do that? If so, where would you get it? thanks! Mark, If your company is on a Maintenance program you can login to the CustomerSource website and download it from there. And yes it can import your csv file. Rob "Mark" <...

Moving bad rows to another sheet
Hi, I need to move any rows containing empty fields or null or #err etc to a separate sheet named error. The column widths are the same and the column headers are the same. It seems to me as if I need to go along the lines of identifying the rows one by one, cutting the row then moving records up. Pasting in the row then making sure the next one is only pasted into a row with all spaces empty. I really dont know where to start with this so even a pointer would be a great help! Many Thanks Rob Hi Rob as a starting point to copy records: http://www.rondebruin.nl/copy5.htm -- Regards F...

How does one change the font in column and row header?
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Is there a way to change the font in the column and row headers? I am trying to change the font size in row header that has the numbers and column headers that have the letters. For example A / 3225, I would like to make it smaller to fit the numbers in the allotted space. No, the formatting of the default Column/Row headings cannot be modified. I'm not sure what you're actually asking to do, though... The Column Headings never contain more than 3 characters (i.e., XFD) & the Row Headings nev...