![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Posts: 91
|
Hi,
The code below shows the steps involved in updating a graph with a data row which you select. What i want it to do is to select the last row of data entered in the colums shown This would done give me a macro which would graph the latest data entered in the sheets.Ie on a weekly basis the data is updated and i want to run a macro which updates all the graphs witht the latest data. Sheets("DSQ401").Select ActiveSheet.ChartObjects("Chart 1").Activate ActiveChart.SeriesCollection.NewSeries ActiveChart.SeriesCollection(2).XValues = "='DSQ401 -- Data'!R1C4:R1C26" ActiveChart.SeriesCollection(2).Values = "='DSQ401 -- Data'!R138C4:R138C26" ActiveChart.SeriesCollection(2).Name = "='DSQ401 -- Data'!R138C3" ActiveWindow.Visible = False thanks for the help, Thomas |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Denver, Colorado USA
Posts: 4,014
|
Hi drag-driver,
While you can modify your VBA code to automatically find the end of data, there is an easier way that doesn't even require VBA: use a named dynamic range. Here's a like which explains it: http://www.willowsolutions.com/tips/tips_2000_03.shtml
__________________
Keep Excelling. Damon VBAexpert Excel Consulting (My other life: http://damonostrander.com ) |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|