+ Reply to Thread
Results 1 to 2 of 2

Sumproduct a variable external workbook based on cell value?

  1. #1
    Registered User
    Join Date
    09-25-2012
    Location
    North East England
    MS-Off Ver
    Excel 2003
    Posts
    2

    Sumproduct a variable external workbook based on cell value?

    Hello all,

    I am hitting a bit of a wall trying to figure out this one and was hoping someone may be able to help.

    In short, I have a large amount of data over a series of workbooks - all in the same folder, all in the same format. These represent each person's workload.

    They all use a single, read only file to update their entries and this is done via a macro. They select their name in Cell B1, and the Macro uses this name to open the correct file when they press the update button. This is all working fine.

    The problem is, they sometimes need to stop on a piece of work and return to it a few days later. Normally this is not an issue, I would use a sumproduct formula to total all the previous time spent on the task where the task ID matches. unfortunately I only know how to do this against a specific, fixed database when what I am after is for the formula to look in workbook with the name that is in cell B1 - just as with the macro to update the file.

    Does anyone have any ideas how I can do this? The formula would need to match 2 criteria (Case Type and Case ID) and then sum a specific column. Lets assume Column A is the Type, B is the ID and C contains the times to be summed together.

    Any help much appreciated. This is the final piece in an otherwise massive project that I simply cannot get my head around.

  2. #2
    Forum Contributor
    Join Date
    03-28-2018
    Location
    Houston, TX
    MS-Off Ver
    Microsoft Office Professional Plus 2016
    Posts
    127

    Re: Sumproduct a variable external workbook based on cell value?

    I know this may be improper to say, but I do not think this is possible using normal Excel formulas. You can probably get really fancy and pull this off, but why? The INDIRECT() formula would normally be the way to go for something like this, but it only works for external references if the externally referenced workbook is opened. There are 2 simple solutions I see here:

    1) Pre-link to all of these cells in a hidden or veryhidden tab to create a vlookup list that can be used when the name is changed.
    2) Program it in VBA

    I personally prefer the second approach and can code it for you if needed. Since it sounds like other things are running on macros, I believe this would be a good option.

    Thanks!

+ 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. External reference with variable workbook name?
    By KenV in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 02-04-2019, 06:21 PM
  2. Formula cell needed -> link to variable external link based on a cell content
    By milea_sorin in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-22-2018, 10:00 AM
  3. [SOLVED] Dynamic Sumproduct using external workbook without it being open
    By Zyrusi in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-30-2017, 06:10 AM
  4. [SOLVED] SUMIF or SUMPRODUCT on External Workbook w/ Wildcards.
    By k64 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-31-2016, 10:03 AM
  5. Cell variable in external external link (hlookup fuction)
    By DorianGrim in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-16-2016, 03:11 AM
  6. External reference with variable workbook name
    By Mister_T in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-23-2014, 06:07 PM
  7. [SOLVED] Copying data from external workbook into current workbook based on cell value
    By Brontosaurus in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-07-2012, 11:17 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