View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Zuzana
 
Posts: n/a
Default Change of File name within a cell reference

Thank you very much. You saved me two days of work =). Kostiz you are a star!

"vezerid" wrote:

Zuzana,
You need something like:
=VLOOKUP($A2, INDIRECT("'[New format "&B$1&".xls]sheetname'!A:B"), 2,
0)

The INDIRECT() function builds dynamic addresses. $A2 is "dollared" so
that the lookup value is always in column A:A. B$1 is dollared so that
the date is always in row 1:1. Hopefully all referenced workbooks will
have the data in a sheet named identically. Otherwise you might need to
have a nested VLOOKUP(), with the sheet names per date.

Write back if you need details.

HTH
Kostis Vezerides