+ Reply to Thread
Results 1 to 7 of 7

vlookup from closed workbook , but files are in same folder

  1. #1
    Forum Contributor
    Join Date
    05-04-2016
    Location
    London
    MS-Off Ver
    MS Office Excel 2010/2013
    Posts
    354

    vlookup from closed workbook , but files are in same folder

    Hi all,

    I was wondering if there is way we can really do a vlookup against closed work for example.

    because today i did a vlookup in 10/25/2017 with 10/26/2017 tomorrow i do it with 10/26/2017 and 10/27/2017. likewise so on .

    path is same but the file dates are different . currently i am using below code to run but i am looking for some dynamic way code that can help my things easy.

    Please Login or Register  to view this content.

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

    Re: vlookup from closed workbook , but files are in same folder

    Try changing this

    Please Login or Register  to view this content.
    to this

    Please Login or Register  to view this content.
    where A1 is the cell you have stored the date in
    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 Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: vlookup from closed workbook , but files are in same folder

    A filename can't contain slashes.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Forum Contributor
    Join Date
    05-04-2016
    Location
    London
    MS-Off Ver
    MS Office Excel 2010/2013
    Posts
    354

    Re: vlookup from closed workbook , but files are in same folder

    Hello K.

    I just need a fix can you please help me on this . I am using tables FYI . below is the formula

    =VLOOKUP([Job Opening ID (Job Opening)],'Z:\Hudson\ Reporting\andrew\Sample\Nov 2017\Copy of NIC closed jobs-2nd November 2017 - hudson.xlsx'!Open[#Data],49,0)

    and how can i refer this in the code . can you help please

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

    Re: vlookup from closed workbook , but files are in same folder

    I have no way to test this properly but try

    Range("a3") = "VLOOKUP([Job Opening ID (Job Opening)],'Z:\Hudson\ Reporting\andrew\Sample\" & Format(Range("A1"), "mmmm") & " " & Format(Range("A1"), "yyyy") & "\Copy of NIC closed jobs-" & Format(Range("A1"), "dd") & "& LOOKUP(DAY(A1),{1,2,3,4},{""st"",""nd"",""rd"",""th""}) " & Format(Range("A1"), "mmmm") & " " & Format(Range("A1"), "yyyy") & " - hudson.xlsx'!Open[#Data],49,0)"

    You will get a problem because the bit highlighted in red will return 2 digit days, and you've implied you have oth 1 and 2 digit days. Not sure how to resolve this.

  6. #6
    Forum Contributor
    Join Date
    05-04-2016
    Location
    London
    MS-Off Ver
    MS Office Excel 2010/2013
    Posts
    354

    Re: vlookup from closed workbook , but files are in same folder

    Hi K,

    Thanks for your time , it really worked for me .
    i have another challenge assume now my destination file is protected and i know the password. every time i run the macro it is asking me to give the password just because my source file is protected .

    how do we fix this , any inputs please ?.

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

    Re: vlookup from closed workbook , but files are in same folder

    Sorry, am no VBA expert.
    VBA and passwords is beyond me.

+ 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. [SOLVED] macro to copy from a closed workbook on a desktop folder and save specific amended sheet
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-16-2017, 08:56 AM
  2. [SOLVED] vba to open closed files remove filter and unhide all hiden colum of opencallsht in folder
    By breadwinner in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-25-2016, 06:33 AM
  3. Vlookup not working with closed files
    By Mr_Phil in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-28-2016, 05:17 PM
  4. Macro to copy cells from all worksheets found in all closed workbook in a network folder
    By Chrispelletier in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-25-2014, 10:26 AM
  5. Combine Data from Closed Files within the same folder
    By lasjbp9 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-07-2013, 10:07 AM
  6. Hyperlink files from folder or sub-folder for the whole workbook
    By Yani.Mio in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-16-2012, 05:38 PM
  7. Vlookup closed files
    By JackieRose in forum Excel General
    Replies: 7
    Last Post: 04-22-2011, 09:24 AM

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