Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using Macro to copy latest data from one Workbook to another
Guys, Heres the intro... What Im THINKING of doing is creating a workbook that will only hav graphs so those people in the management who dont feel comfortable wit figures can grasp the basic info just by looking at the graphs... What I donot want to do is update the graph workbook everyday as i takes its data from quite a few other workbooks. What Im thinking of i that I would have a macro that would copy the latest date's figures fro each sheet in the workbooks and paste them in the graph workbook. So any ideas how should I go about doing this... I cant think of an command that would let me do this, looping would start from first dat (in the data files) but that would ruin my spreadsheet as my grap report doesnt take into account all the last couple of years dates... Please advise. cheer -- Kayot ----------------------------------------------------------------------- Kayote's Profile: http://www.excelforum.com/member.php...fo&userid=3331 View this thread: http://www.excelforum.com/showthread.php?threadid=55156 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using Macro to copy latest data from one Workbook to another
If your graphs already exist
Sub BuildChartBook() Dim bk as Workbook, sh1 as worksheet Dim sh as worksheet, rw as Long Dim cht as ChartObject set bk = Workbooks("Chart.xls") set sh1 = bk.Worksheets(1) rw = 5 for each sh in Workbooks("GraphMaster.xls").Worksheets for each cht in sh.chartObjects cht.copypicture bk.Activate sh1.Activate sh1.Cells(rw,2).Select sh1.Paste rw = rw + 20 Next Next End Sub If you want to manipulate the graphs, turn on the macro recorder while you do it manually, then turn off the macro recorder and look at the recorded code. then generalize the code and combine it with some form of the first macro. -- Regards, Tom Ogilvy "Kayote" wrote: Guys, Heres the intro... What Im THINKING of doing is creating a workbook that will only have graphs so those people in the management who dont feel comfortable with figures can grasp the basic info just by looking at the graphs... What I donot want to do is update the graph workbook everyday as it takes its data from quite a few other workbooks. What Im thinking of is that I would have a macro that would copy the latest date's figures from each sheet in the workbooks and paste them in the graph workbook. So any ideas how should I go about doing this... I cant think of any command that would let me do this, looping would start from first date (in the data files) but that would ruin my spreadsheet as my graph report doesnt take into account all the last couple of years dates... Please advise. cheers -- Kayote ------------------------------------------------------------------------ Kayote's Profile: http://www.excelforum.com/member.php...o&userid=33314 View this thread: http://www.excelforum.com/showthread...hreadid=551560 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy most recent data from one workbook to another with a Macro | Excel Discussion (Misc queries) | |||
Create a macro to copy data from one workbook to another | Excel Discussion (Misc queries) | |||
$%Macro to Copy from one workbook to other when matching data | Excel Discussion (Misc queries) | |||
Macro Help. Copy data from 1 workbook to another on next available | Excel Discussion (Misc queries) | |||
Macro to copy data into another workbook | Excel Discussion (Misc queries) |