Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Formula to use date in file name link reference

I am stuck with this one and was hoping someone could help. I am
trying to figure out a formula that uses the date from a cell in the
file reference.
D2 contains: 02/01/09 (date format)
D7 contains the current formula:=SUM('G:\PATH HERE\Poker\[020109.xls]
POKER'!$H$16:$H$21)
I want the date portion of the formula "020109" to be replaced with
the date in D2. Each column has a different date. Any help anyone
can provide is greatly appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,104
Default Formula to use date in file name link reference

You need to use the INDIRECT function
=SUM(INDIRECT("'G:\PATH
HERE\Poker\["&TEXT(D2,"ddmmyy")&".xls]POKER'!$H$16:$H$21"))

Your example date (02/01/2009) gave no clue as your date convention. My
formula is for the universal format dd/mm/yyyy; for the USA format please
change to TEXT(D2,"mmddyy")

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"DFruge" wrote in message
...
I am stuck with this one and was hoping someone could help. I am
trying to figure out a formula that uses the date from a cell in the
file reference.
D2 contains: 02/01/09 (date format)
D7 contains the current formula:=SUM('G:\PATH HERE\Poker\[020109.xls]
POKER'!$H$16:$H$21)
I want the date portion of the formula "020109" to be replaced with
the date in D2. Each column has a different date. Any help anyone
can provide is greatly appreciated.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Formula to use date in file name link reference

The function you'd want to use that's built into excel is =indirect(). But that
function returns an error if the sending workbook is closed.

If that's a problem, then Laurent Longre has an addin (morefunc.xll) at:
http://xcell05.free.fr/
or
http://xcell05.free.fr/morefunc/english/index.htm

That includes =indirect.ext() that may help you.

========
Ps. If D2 really contains a date, you'd want to format that date nicely:

=sum(indirect("'G:\PATH HERE\Poker\[" & text(d2,"mmddyy")
& ".xls]POKER'!$H$16:$H$21"))

(Untested)

Is 02/01/09
Feb 1, 2009
or
Jan 2, 2009
or
Sept 2, 2001
or
.....

Adjust that formatting string to what you need.



DFruge wrote:

I am stuck with this one and was hoping someone could help. I am
trying to figure out a formula that uses the date from a cell in the
file reference.
D2 contains: 02/01/09 (date format)
D7 contains the current formula:=SUM('G:\PATH HERE\Poker\[020109.xls]
POKER'!$H$16:$H$21)
I want the date portion of the formula "020109" to be replaced with
the date in D2. Each column has a different date. Any help anyone
can provide is greatly appreciated.


--

Dave Peterson
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 to remove the file link from the formula? Jignesh Gandhi Excel Worksheet Functions 4 May 10th 23 07:44 PM
How to link an Excel file due date to Outlook calendar date? anok New Users to Excel 0 May 9th 07 09:31 PM
Add reference to DDE Link formula xlcharlie Excel Worksheet Functions 0 July 11th 06 05:03 PM
formula link to a file Param Excel Worksheet Functions 0 April 14th 06 03:13 AM
Q: Can a formula reference a cell to get the file name to link to for data? mgarcia Excel Discussion (Misc queries) 3 January 18th 06 02:56 PM


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

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

About Us

"It's about Microsoft Excel"