Data Range Spanning Workbooks?


Posted by Corey Weir on July 03, 2001 9:52 AM

I was wondering if someone knew a way that I could specify a data range which spans two workbooks? In my example, I have seperate workbooks for two different months (ie. June and July) and I want to create a chart which covers the dates of June 22 to July 21 and the data for these dates. How can I do it?



Posted by Damon Ostrander on July 03, 2001 12:26 PM

Hi Corey,

Data ranges can be in different workbooks, just as they can be on different worksheets in the same workbook. It is just a matter of including the workbook identifier in the range reference. For example:

'[Finance Data.xls]Sheet1'!$E$5

the string in square brackets specifies the workbook, the unbracketed string followed by "'" specifies the worksheet, and what follows the "!" specifies the cell range. If workbook is not specified the active workbook is assumed. If worksheet is not specified the active worksheet is assumed. There is even a level above this--the application (if application is not specified, Excel is assumed).

Happy charting.

Damon