+ Reply to Thread
Results 1 to 7 of 7

Can an Array Formula Get Data from Multiple Worksheets?

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    10-08-2012
    Location
    San Clemente, California
    MS-Off Ver
    Office365
    Posts
    383

    Can an Array Formula Get Data from Multiple Worksheets?

    Good Morning!

    I have many Input workbooks, all identical except for the data values. On my Result workbook I want to extract the value at cell A1 from each of the other workbooks. The resulting values will appear starting in Column B1 through Bx.

    I know this can be done in VBA and have done so in the past. My question is this: can the same result be accomplished with array formulas in the Result workbook?

    Thanks in advance for your thoughts.

    tom

  2. #2
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Can an Array Formula Get Data from Multiple Worksheets?

    Do you mean WORKSHEETS, or WORKBOOKS? You can have multiple WORKSHEETS in one WORKBOOK. Each WORKBOOK is its own file.

    If you are referring to multiple sheets within the same workbook, and assuming your sheets are using default names (Sheet1, Sheet2, etc.) you could use this in B1 and fill down:

    =INDIRECT("Sheet"&ROW()&"!A1")

    - Moo

  3. #3
    Forum Contributor
    Join Date
    10-08-2012
    Location
    San Clemente, California
    MS-Off Ver
    Office365
    Posts
    383

    Re: Can an Array Formula Get Data from Multiple Worksheets?

    Hey Moo,

    Thanks for your input. I need to clarify. These are all separate workbooks, e.g., separate Excel files. All of the input files will be in the same folder and that is all that will be there so we can grab all xlsx files. That is how I did it in VBA. I would like to eliminate need for VBA and wondered if an array formula might suffice.

  4. #4
    Forum Contributor
    Join Date
    10-08-2012
    Location
    San Clemente, California
    MS-Off Ver
    Office365
    Posts
    383

    Re: Can an Array Formula Get Data from Multiple Worksheets?

    Hey Moo,

    Thanks for your input. I need to clarify. These are all separate workbooks, e.g., separate Excel files. All of the input files will be in the same folder and that is all that will be there so we can grab all xlsx files. That is how I did it in VBA. I would like to eliminate need for VBA and wondered if an array formula might suffice.

  5. #5
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Can an Array Formula Get Data from Multiple Worksheets?

    The only way I can think of doing this without VBA would be to make a list of the filenames somewhere and still use an INDIRECT formula. The biggest drawback is that all of the workbooks need to be open for INDIRECT to work/update.

    For instance, if you had 10 files and you listed their names in cells A1:A10 of your summary workbook (A1=MyBook.xlsx, A2=AnotherBook.xlsx, etc.) then in B1 (or any other cell), you could enter this formula and fill it down 9 more rows to get the data from cell A1 of Sheet1 from each workbook:

    =INDIRECT("'C:\Users\Vince\Documents\["&A1&"]Sheet1'!A1")

    Obviously, you would need to add your own file path, instead of C:\Users\Vince\Documents\

    Perhaps one of the amazing gurus here knows a better way of doing this without having the workbooks open, and without using VBA, but I don't.

    Hope this helps...

    - Moo

  6. #6
    Forum Contributor
    Join Date
    10-08-2012
    Location
    San Clemente, California
    MS-Off Ver
    Office365
    Posts
    383

    Re: Can an Array Formula Get Data from Multiple Worksheets?

    Moo, you make an excellent point about the files needing to be open. The more I look at it the less I think I can get the job done without VBA. This was not a absolute-must-have but rather a desire. Unless someone else has other notions about how to avoid VBA, I shall go ahead and do it the "old" way.

    Thanks ever so much for your contribution. Although we have not succeeded, I will mark this as solved.

    Take care and stay warm in my home state (where we now wait patiently for the Pack's next season).

  7. #7
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Can an Array Formula Get Data from Multiple Worksheets?

    snap,

    glad I could, well, attempt to help

    I've done what you are trying to do, and found that VBA was the easiest way... lots of tips on the interwebs on how to do it.

    Thanks for the feedback, as well. It is always appreciated. And of course, GO PACK GO! (next season) heh

    - Moo

+ 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] Highest to lowest results using multiple data with array formula
    By Jacolene in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-23-2016, 04:32 AM
  2. Array Formula Indexing multiple columns/multiple worksheets
    By cwhite86 in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 11-19-2015, 02:19 PM
  3. Multiple criteria array formula in data validation
    By Cheete in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-19-2015, 09:37 AM
  4. [SOLVED] append multiple worksheets data to a single multi-dimensional array
    By junoon in forum Excel Programming / VBA / Macros
    Replies: 36
    Last Post: 04-10-2012, 02:28 PM
  5. Replies: 1
    Last Post: 07-26-2011, 02:58 AM
  6. Replies: 6
    Last Post: 06-14-2011, 07:18 AM
  7. Formula Referencing data on multiple worksheets
    By ChrisPrather in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-22-2006, 12:15 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