+ Reply to Thread
Results 1 to 9 of 9

Convert date into filename for linking cell to another file

  1. #1
    Forum Contributor
    Join Date
    12-18-2011
    Location
    long island
    MS-Off Ver
    365
    Posts
    236

    Convert date into filename for linking cell to another file

    Hello,

    I am trying to link a cell on my main spreadsheet to an external workbook, but want to change which workbook depending on which date i enter on my main spreadsheet.
    All the source workbooks are in the same filepath, their names are in d-m-yyyy format.

    Ive attached a spreadsheet showing my thinking so far.

    Thank you
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Convert date into filename for linking cell to another file

    You say the names are in d-m-yyyy format but under filename on your spreadsheet you have m-dd-yyyy format.
    Can you provide examples of the filenames along with their pathname?
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Contributor
    Join Date
    12-18-2011
    Location
    long island
    MS-Off Ver
    365
    Posts
    236

    Re: Convert date into filename for linking cell to another file

    The format changes from m-d to mm-dd as needed depending on the date. I set it up in my example spreadsheet that way. If you enter a date in the highlighted field, it gets converted to the proper format in D7
    Im at the point now where i need to tell excel that the text in D7 is the filename, and the text in E7 is the filepath

  4. #4
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Convert date into filename for linking cell to another file

    So the names are NOT in d-m-yyy format as originally stated.

    Just concatenate E7 and D7 and supply a file extension.

  5. #5
    Forum Contributor
    Join Date
    12-18-2011
    Location
    long island
    MS-Off Ver
    365
    Posts
    236

    Re: Convert date into filename for linking cell to another file

    Using concatenate i get my complete file extension as 'S:\My Documents\[5-9-2017.xlsx]Sheet1'!$A$1
    So this is where my source data is located. How to i get excel to execute that command? If i do equals to the concatenate cell in another cell it just copies over the file extension as text

  6. #6
    Forum Contributor
    Join Date
    12-18-2011
    Location
    long island
    MS-Off Ver
    365
    Posts
    236

    Re: Convert date into filename for linking cell to another file

    Ive attached the workbook im working on along with two example source files with dates 5/9/17 and 4/30/17

    Where i have the #REF! error should be where im automatically linking to those workbooks when i change the date in the highlighted field.
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Convert date into filename for linking cell to another file

    Yes, I'm getting #REF too.
    Not sure how to achieve this next step.
    Last edited by Special-K; 05-10-2017 at 11:18 AM.

  8. #8
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Convert date into filename for linking cell to another file


  9. #9
    Forum Contributor
    Join Date
    12-18-2011
    Location
    long island
    MS-Off Ver
    365
    Posts
    236

    Re: Convert date into filename for linking cell to another file

    Can this be achieved through VBA?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Record Filename and Creation date of file used in another file
    By garveyarmy in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-21-2014, 04:00 PM
  2. How can I convert an Excel 2007 cell into a filename?
    By ElizaF in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-20-2013, 12:26 PM
  3. [SOLVED] VBA Save a file with filename and last Sundays date.
    By Lady_Shaz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-04-2012, 06:36 PM
  4. Search for Filename with Date and Open File
    By Gingeiko in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-29-2011, 08:11 PM
  5. Linking filename and cell contents.
    By Zagra147 in forum Excel General
    Replies: 2
    Last Post: 10-09-2009, 07:09 AM
  6. convert cell content to filename
    By [email protected] in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-01-2006, 03:10 PM
  7. Replies: 4
    Last Post: 11-14-2005, 02:40 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1