View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Embedding the value of a cell in a formula

Say we put the workbook name in H6 and in another cell:

=INDIRECT("'C:\test folder\[" & H6 & ".xls]Sheet2'!$F$3")

so if H6 contains 2009, the formula will return the value from 2009.xls

Note that we can specify sheet and cells as well. The limitation is that
the workbook specified in H6 must be open.
--
Gary''s Student - gsnu200857


"Len" wrote:

I would like to have the contents of a cell be part of a formula. For example:

In one cell I have the year: 2009

In the other a formula references another workbook: =C:/.../Ad Sales 2009!A1

I would like to be able to change the first cell to year 2010 and have the
formula automatically change with it to =C:/.../Ad Sales 2010!A1

Is this possible?