+ Reply to Thread
Results 1 to 7 of 7

Changing file names within worksheets

  1. #1
    Registered User
    Join Date
    03-25-2009
    Location
    Kitchener, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    3

    Changing file names within worksheets

    Hello, I am hoping someone may be able to help me.

    I am going to go my best to explain what I am looking to do....

    my formula is as follows:
    =(VLOOKUP(A7,'[Monthly AR Analysis - Feb09.xls]AR - Current'!$A$1:$I$153,8,FALSE))

    I will be using this for formula on about 15 different worksheets ... my issue is the file name changes every month and currently I have to go in and do a find and replace, I would like to have one main page where I could change the file name month and it will change all the rest.

    ie: Monthly AR Analysis - Feb09.xls next month changes to Monthly AR Analysis - Mar09.xls .... So basically each month I want it to pick up the new file that has been saved with the new name.

    So what I would want is to be able to have a cell that I could change the Feb09 to Mar09 and then it would do the same to all the worksheets

    Is this possible?

    I attempted to use CONCATENATE to change file name and it worked but will not work within the Vlookup....

    I would appreicate any advise .... thanks in advance.
    Last edited by NBVC; 03-25-2009 at 04:24 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Changing file names within worksheets

    Perhaps

    =VLOOKUP(A7,INDIRECT("'[Monthly AR Analysis - "&X1&".xls]AR - Current'!$A$1:$I$153"),8,FALSE)

    where X1 would hold the variable data
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    03-25-2009
    Location
    Kitchener, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Changing file names within worksheets

    hmmm that doesn't seem to have worked as I got an error message

  4. #4
    Registered User
    Join Date
    03-25-2009
    Location
    Kitchener, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Changing file names within worksheets

    I tried again and it worked thank you so much

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Changing file names within worksheets

    If you are satisfied with the solution provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

  6. #6
    Registered User
    Join Date
    08-17-2012
    Location
    Kaoshiung Taiwan
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Changing file names within worksheets

    Hello,

    I encountered simillar problem in which I need to get "total daily sales" record from daily sales file.
    The daily sales file is saved as this format: 101mmdd.xls.

    And I wish to get the "total daily sales" record from the revenues.xls file by typing in 101mmdd on cell "C1" like entering 1010818 on cell "C1" to get the August 18 "total daily sales" record. I tried to type the formula as follows:

    ='C:\Users\user\Data\[&c1&.xls]Daily_WorkSheet'!B4

    or

    ='C:\Users\user\Data\["&c1&".xls]Daily_WorkSheet'!B4

    But both won't work. ...

    Please kindly help...

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Changing file names within worksheets

    guochingsu,

    Welcome to the Forum, unfortunately:

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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