ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Variable Work Book Reference (https://www.excelbanter.com/excel-programming/358015-variable-work-book-reference.html)

jimpy22

Variable Work Book Reference
 

Hi,

Can anyone help. I am trying to build a workbook that analyses the data
from other workbooks. I.e. I receive timesheet data each month from
employees and I want to change the name of the workbook the data comes
from in each work sheet in the analyses workbook.

For instance I import the data in a particular cell using:

=[timesheet_TT_april_06.xls]Week5!$A$5

But the name of the file timesheet_TT_april_06.xls will change every
month and I use the name in multiple cells to import the data from
various cells.

I have tried putting the name of the other workbook in a cell in the
analyses workbook and then referenced the cell in the file location but
excel does not like it.

Can anyone tell me how I can use a macro or VB function etc to make the
file name a variable I can include in the location of the cell data.

I have tried many different techniques and trawled the web for
solutions without luck.

Thanks in anticipation of any help


--
jimpy22
------------------------------------------------------------------------
jimpy22's Profile: http://www.excelforum.com/member.php...o&userid=33155
View this thread: http://www.excelforum.com/showthread...hreadid=529733



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com