+ Reply to Thread
Results 1 to 12 of 12

Excel directory formula question?

Hybrid View

schill2 Excel directory formula... 09-22-2013, 10:11 AM
rcm Re: Excel directory formula... 09-22-2013, 10:46 AM
schill2 Re: Excel directory formula... 09-22-2013, 10:59 AM
Tony Valko Re: Excel directory formula... 09-22-2013, 11:04 AM
schill2 Re: Excel directory formula... 09-22-2013, 11:06 AM
Tony Valko Re: Excel directory formula... 09-22-2013, 11:14 AM
schill2 Re: Excel directory formula... 09-22-2013, 11:17 AM
schill2 Re: Excel directory formula... 09-22-2013, 11:18 AM
  1. #1
    Registered User
    Join Date
    08-16-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    22

    Unhappy Excel directory formula question?

    Excel directory formula question?
    So I have this formula:
    ='C:\Users\XXX\Documents\Debug\F1\203\…

    I have to replace the "203" folder in the file directory for 60 rows about 30 times with different folders. I don't want to do this manually :s
    Is there a formula to allocate a cell which Excel will reference for the name of the folder it should be going to for the file?

  2. #2
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Excel directory formula question?

    yes you could do it in a macro

  3. #3
    Registered User
    Join Date
    08-16-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: Excel directory formula question?

    Quote Originally Posted by rcm View Post
    yes you could do it in a macro
    yes, i know u could use a macro but how?

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Excel directory formula question?

    Quote Originally Posted by schill2 View Post
    Is there a formula to allocate a cell which Excel will reference for the name of the folder it should be going to for the file?
    Yes!

    However, for the function to work all the files you link to must be open!

    This is usually not desirable.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Registered User
    Join Date
    08-16-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: Excel directory formula question?

    I'll be fine, don't worry. Please provide the formula.

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Excel directory formula question?

    Show us the full path to the file/sheet/cell you want to link to.

  7. #7
    Registered User
    Join Date
    08-16-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: Excel directory formula question?

    ='C:\Users\XXX\Documents\Debug\F1\203\[CDS-Percentx.csv]CDS-Percentx'!$G$200

  8. #8
    Registered User
    Join Date
    08-16-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: Excel directory formula question?

    Quote Originally Posted by Tony Valko View Post
    Show us the full path to the file/sheet/cell you want to link to.
    ='C:\Users\XXX\Documents\Debug\F1\203\[CDS-Percentx.csv]CDS-Percentx'!$G$200

    So the full path is this -
    C:\Users\XXX\Documents\Debug\F1\203\CDS-Percentx.csv

  9. #9
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Excel directory formula question?

    Let's assume cell A2 = the folder name like 203.


    =INDIRECT("'C:\Users\XXX\Documents\Debug\F1\"&A2&"\[CDS-Percentx.csv]CDS-Percentx'!$G$200")

+ 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. Replies: 0
    Last Post: 09-05-2013, 10:00 AM
  2. Need VBA code to search file in directory and sub-directory and show result
    By johnchencanada in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-19-2012, 11:13 PM
  3. General Security Question-Active Directory Verification?
    By AlvaroSiza in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-18-2011, 09:55 PM
  4. Reading in the files in a directory into an array, directory chosen by user
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-18-2011, 12:52 PM
  5. Replies: 1
    Last Post: 08-08-2007, 03:50 AM

Tags for this Thread

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