+ Reply to Thread
Results 1 to 11 of 11

An array covering multiple excel files

  1. #1
    Registered User
    Join Date
    02-04-2011
    Location
    boulder, co
    MS-Off Ver
    Excel 2003
    Posts
    74

    Question An array covering multiple excel files

    Hello all!

    I am trying to cut down on a lot of manual input. Right now I enter in values everyday by finding specific work orders and copying a few lines of information from each one. Everday the work orders are different and each work order is its own excel file.

    I would like, if possible, to use a vlookup whose array covered an entire folder of excel files, not just workbooks within one excel file. I would then only have to type in the work order number, and the equation would go searching for the file title with that number in it. All of our work orders are made from a premade template so everything I need are always in the same spots in every work order.

    Any advice would be greatly appreciated.

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

    Re: An array covering multiple excel files

    You can reference other files indirectly with the use of the INDIRECT() function if you input the name of the file in a cell on your "summary" sheet, but that function, unfortunately only works with open workbook sources... but, fortunately, there is a free addin you can download and adapt it's INDIRECT.EXT() function to work with closed workbooks. The addin is found here: Morefunc.

    you would have to give us the formula you are currently using along with the path and the cell you'd enter the file name in... if you need assistance formulating it to work with this function.
    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
    02-04-2011
    Location
    boulder, co
    MS-Off Ver
    Excel 2003
    Posts
    74

    Re: An array covering multiple excel files

    Hrm, yea I would need the extension to be able to pull information from un-open files, otherwise I might as well spend the extra 5 sec copying the info.

    As for the indirect, I'm not quite sure how that would work, can you give an example?

    Here's kinda what I'd like:
    Summary.xls
    A | B
    WO | PO
    SAL1234 | AZ987765


    So the PO is found from a specific cell in the file SAL1234.xls and everything in column A is going to be from a different .xls file. On top of that, I'm worried about how accurate the file name would have to be. For instance, the file SAL1234 is actually titled SAL1234 denver CO.xls but when inputting the lookup value, it would only be the first part.

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

    Re: An array covering multiple excel files

    do all the sheet names end with "denver CO"? and if not, can you add another column that can be use in order to concatenate and create the final file name?

    If so, then please elaborate on what exactly is being looked up? Is it the PO in column B, based on the partial sheetname in column A?

  5. #5
    Registered User
    Join Date
    02-04-2011
    Location
    boulder, co
    MS-Off Ver
    Excel 2003
    Posts
    74

    Re: An array covering multiple excel files

    No, its not all denver, CO. the general file name usually goes like this: (WO) (company) (state) (city).xls. And yes, another column can be used. However, remember that the only info given to me to look up the files is the WO. Looking up the company, state, and city to create an exact reference for the formula would be more work than what I'm doing now.

    And sorry for my poor example, but column B was supposed to be what the formula returned. Column A is the reference cell and B is what is found in a specific cell ('[SAL1234 RandomCorp TX dallas.xls]WORK ORDER'!$J$6) within another excel file.

    It would be easy enough to just say ='[SAL1234 RandomCorp TX dallas.xls]WORK ORDER'!$J$6. but I need an array for finding that specific file (SAL1234 RandomCorp TX dallas.xls) amongst all the other work orders based on the reference cell in Column A (SAL1234).

    I hope that cleared it up...a bit :/

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

    Re: An array covering multiple excel files

    If you can't somehow create the whole name of the path to follow, I am not sure it can be done...(perhaps with VBA) but not with functions (unless I missed something).

    but as an example of using the INDIRECT.EXT:

    =INDIRECT.EXT("'["&A1&" RandomCorp TX dallas.xls]WORK ORDER'!$J$6")

    where A1 contains SAL1234. The problem is you need to either hardcode or softcode "RandomCorp TX dallas" to link to the file.

  7. #7
    Registered User
    Join Date
    02-04-2011
    Location
    boulder, co
    MS-Off Ver
    Excel 2003
    Posts
    74

    Re: An array covering multiple excel files

    Wow, thats great. I've been playing around with the indirect.ext and I think it's a huge step. I also didn't know how to sub in a cell reference into a file path like that ("&A1&"). So, yes, now all that remains is to get the file name. Is there anyway to search directories or my computer? Or, in a vlookup type function you have the ability to choose the range (T or F) on how exact the match is...could I somehow implement that into finding an incomplete filename?

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

    Re: An array covering multiple excel files

    Is there a way that you can list all the column A names in a column and have the possible associated "filename" endings in adjacent cells, then you can run a vlookup of A1 in that table to extrude the endings?

    If not, I don't think it would be an easy task to do a fuzzy lookup on workbooks without some VBA intervention.. which would be for someone else to help determine

  9. #9
    Registered User
    Join Date
    02-04-2011
    Location
    boulder, co
    MS-Off Ver
    Excel 2003
    Posts
    74

    Re: An array covering multiple excel files

    Eh, I can only do that if there's a formula to autogenerate a list of files in a folder.

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

    Re: An array covering multiple excel files

    You will need VBA to do that... check here:

    Create a list of Filenames in a Directory


    or google something like "vba create a list of files from a directory"

  11. #11
    Registered User
    Join Date
    02-04-2011
    Location
    boulder, co
    MS-Off Ver
    Excel 2003
    Posts
    74

    Re: An array covering multiple excel files

    Dang, well unless someone else has an idea, it looks like I'll have to do this in vba. And if I'm doing that already, I might as well do the whole thing and not just to find the filelist.

    So it looks like I'll have to post this question in VBA. Thanks for help NBVC.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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