+ Reply to Thread
Results 1 to 3 of 3

SumProduct for external files using cell references for file path?

  1. #1
    Registered User
    Join Date
    11-02-2011
    Location
    BC, Canada
    MS-Off Ver
    Excel 2016
    Posts
    22

    SumProduct for external files using cell references for file path?

    Hi everyone, sorry if this is a little incoherent, I've read so many posts and articles today trying to figure this out my brain is a little scrambled. Basically I'm trying to use SumProduct as a SumIf because the source data is in 21 external files that will be closed so SumIf and Indirect are out if I understand correctly. The 21 external files are all formatted identically so the ranges are exactly the same for each. There are however some empty rows and I think I recall reading that this can be an issue, not sure if it's a resolvable one or not though.

    I've attached a workbook with some examples of the external file ranges and the desired outcome as well as a few of the millions of different formula combinations I've tried. Hopefully it will be clear to you experts what it is I'm trying to accomplish here, but just to add a little more clarity (hopefully), here is the description...

    My Destination Table has 4 columns:
    Folder Path File Name Cycle Workable Hours

    I'm trying to incorporate the Folder Path and File Name values into a SumProduct formula to look in the source workbook on the 'Time Entry' worksheet in Range $A$3:$A$274 and sum all the values in Range $BJ$3:$BJ$274 where the cell values of the rows in the first range match with the 'Cycle' value in my destination table, so basically a SUMIF... as I said there are blank rows in the source wbs, and I'm wondering if that's a dealbreaker?

    I've tried using Power Query to do this, but something really weird happens if the source wbs are opened, and it messes up the queries. I've never experienced that before and was wondering if it had something to do with the source wb file extensions being .xlsb? Either way, I thought a formulaic approach might actually be better and faster if it's possible.

    Thanks in advance!
    Joe
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,564

    Re: SumProduct for external files using cell references for file path?

    Excel DOES NOT handle this sort of thing well.

    SUMPRODUCT(--('Path[Filename.xlsx]Name of Sheet'!$A$3:$A$100=[@Cycle])*''Path[Filename.xlsx]Name of Sheet'!'!$BJ$3:$BJ$100)

    does work perfectly, once you replace Path, Filename and sheet with whatever matches your real data.

    HOWEVER, if you want to pick those up using a cell reference...forget it. You'll have to do it manually, once for each file. The cycle number, however, can be copied down the table.

    If you'd prefer VBA, then say so and I will move your thread for you.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Registered User
    Join Date
    11-02-2011
    Location
    BC, Canada
    MS-Off Ver
    Excel 2016
    Posts
    22

    Re: SumProduct for external files using cell references for file path?

    Darn it, I was hoping that wasn't the case. Thanks for taking the time to reply though, maybe I'll keep trying with power query for a bit before I move to VBA.

    Thanks,
    Joe

+ 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] SaveAs file path that references cell value
    By swood15 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-25-2014, 01:45 PM
  2. [SOLVED] How prevent formulas to get external references/path to current workbook?
    By paul in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 07:05 PM
  3. [SOLVED] How prevent formulas to get external references/path to current workbook?
    By Gunnar Johansson in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 06:05 PM
  4. [SOLVED] How prevent formulas to get external references/path to current workbook?
    By Gunnar Johansson in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 PM
  5. How prevent formulas to get external references/path to current workbook?
    By Gunnar Johansson in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  6. Replies: 3
    Last Post: 09-06-2005, 04:05 AM
  7. How prevent formulas to get external references/path to current workbook?
    By Gunnar Johansson in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-15-2005, 06:05 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