Forum Discussion

jible diblef's avatar
jible diblef
Copper Contributor
Jan 19, 2018
Solved

Need help writing complex formula - I'm at my wits end!

Hello there,  I have a problem which I hope someone here can help with...   I want to be able to sum a range of entries from one specific column in another cell in another spreadsheet, on some ...
  • Haytham Amairah's avatar
    Jan 19, 2018

    Hi,

     

    It's not as complex as you think!

    Needs to https://support.office.com/en-us/article/countifs-function-dda3dc6e-f74e-4aee-88bc-aa8c2a866842 function.

     

    Put this formula in cell D6: 

    =COUNTIFS($G$6:$G$14,A6,$H$6:$H$14,B6,$I$6:$I$14,C6)

     

    Let's suppose that you have two workbooks, the first one called Book1 and the second called Book2.
    and Table 1 is located in Book2, Table 2 in Book1.

     

    In this case you can use this formula:

    =COUNTIFS([Book1.xlsx]Sheet1!$G$6:$G$14,A5,[Book1.xlsx]Sheet1!$H$6:$H$14,B5,[Book1.xlsx]Sheet1!$I$6:$I$14,C5)

     

    But the problem with COUNTIFS is: it requires that the source file be open.

    If you close it, then return to the formula and update it you will get a #VALUE! error!

     

    You have to keep the source file open or to use this formula instead:

    =SUMPRODUCT(--(A5=[Book1.xlsx]Sheet1!$G$6:$G$14)*--(B5=[Book1.xlsx]Sheet1!$H$6:$H$14)*--(C5=[Book1.xlsx]Sheet1!$I$6:$I$14)) 

Resources