Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Zuzana
 
Posts: n/a
Default Change of File name within a cell reference

I am trying to create a spreadsheet looking like:
date1 date 2
date
name =vlookup(name,file name date1 ,2,false) vlookup(name,file name
date2...)

I need to Vlookup data from different files within same folder, the files
names contain a date within : eg. New format 1.12.2005.xls, next New format
2.12.2005.xls.

The spreadsheet I am trying to create has each column heading with a
different date and based on the date I would like to reference the file whose
name contains the date and return the value from that file. How can I do
this? Can anybody help me?

Thank you!


  #2   Report Post  
Posted to microsoft.public.excel.misc
vezerid
 
Posts: n/a
Default Change of File name within a cell reference

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

  #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


  #4   Report Post  
Posted to microsoft.public.excel.misc
vezerid
 
Posts: n/a
Default Change of File name within a cell reference

Glad to know it worked :)

Kostis

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I change a cell range with a reference cell? Danneskjold Excel Discussion (Misc queries) 2 August 11th 05 07:37 PM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM
how do i reference data in a file with the fname in another cell? jhlrtn Excel Worksheet Functions 1 May 23rd 05 11:11 PM
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM
Weekly Transaction Processing Ralph Howarth Excel Worksheet Functions 4 January 19th 05 05:37 AM


All times are GMT +1. The time now is 09:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"