+ Reply to Thread
Results 1 to 12 of 12

SUMPRODUCT syntax problems (to substitute SUMIFS)

  1. #1
    Forum Contributor
    Join Date
    06-10-2005
    MS-Off Ver
    2007
    Posts
    223

    SUMPRODUCT syntax problems (to substitute SUMIFS)

    Hi,
    I have 3 instances where I need the SUMPRODUCT instead of SUMIF and SUMIFS since the results are #VALUE in my SUMMARY file when the DATA workbook is closed. After several unsuccessful tries I've attached a file with the 3 cells highlighted where I would like to use the SUMPRODUCT formula.

    Any suggestions would be appreciated.

    Thanks,

    Phillycheese
    Attached Files Attached Files
    Last edited by Phillycheese5; 03-12-2019 at 01:28 PM.

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: SUMPRODUCT syntax problems (to substitute SUMIFS)

    Please try at C20 and Press Ctrl+Shift+Enter

    =SUM($G$8:$G$12*($F$8:$F$12=TRANSPOSE($C$8:$C$16)))

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: SUMPRODUCT syntax problems (to substitute SUMIFS)

    Why not use cells D8:D16 to get the individual country values and then let C20 sum the appropriate values from D8:D16. You'll need to list the region name agoanst each of the C8:C16 countries,

    Therefore in D8 copied down

    Please Login or Register  to view this content.
    Would you also update your location please. It often helps if we need to consider things like regional settings and date formats.
    Last edited by Richard Buttrey; 03-11-2019 at 01:13 PM.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Forum Contributor
    Join Date
    06-10-2005
    MS-Off Ver
    2007
    Posts
    223

    Re: SUMPRODUCT syntax problems (to substitute SUMIFS)

    Hi Bo_Ry, I tried the formula within the file I posted and it works great. But when I tried it in my actual file, which references an external file, it didn't work. Any ideas?

  5. #5
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: SUMPRODUCT syntax problems (to substitute SUMIFS)

    Please Try cut C20 and paste to other files

    or this with CSE
    =SUM([Formula_Help_SUMPRODUCT.xlsx]Sheet1!$G$8:$G$12*([Formula_Help_SUMPRODUCT.xlsx]Sheet1!$F$8:$F$12=TRANSPOSE([Formula_Help_SUMPRODUCT.xlsx]Sheet1!$C$8:$C$16)))

  6. #6
    Forum Contributor
    Join Date
    06-10-2005
    MS-Off Ver
    2007
    Posts
    223

    Re: SUMPRODUCT syntax problems (to substitute SUMIFS)

    Hi Richard, yes that wouldn't be so bad if it were only 1 or 2 lists. But in my actual file I have many lists of countries and regions, for many different portfolios. There are also a lot of other formulas so it would be a big re-work to get the data switched around in my actual file. That's why I'm hoping for a formula solution.

  7. #7
    Forum Contributor
    Join Date
    06-10-2005
    MS-Off Ver
    2007
    Posts
    223

    Re: SUMPRODUCT syntax problems (to substitute SUMIFS)

    Hi Bo_Ry, the formula basically ends up being like this:

    =SUM([DATA.xlsx]Sheet1!$G$8:$G$12*([DATA.xlsx]Sheet1!$F$8:$F$12=TRANSPOSE([SUMMARY.xlsx]Sheet1!$C$8:$C$16)))

    The list of countries I'm trying to match against is in my SUMMARY file whereas the country names that I'm trying to match, along with corresponding percentages, is in the DATA file. Even with the DATA file open I'm getting a #VALUE result so I'm not sure why that is the case. Yes I am! I just did a test and it seems like the G$8:G$12 needs to be the entire list. In my actual DATA file I could have a list of 50 or 100, with headers and/or blank spaces so I used a range of G$1:G$200 to ensure I would grab all the data. Is there any modification to the formula that would allow for that?

  8. #8
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: SUMPRODUCT syntax problems (to substitute SUMIFS)

    Maybe try this with CSE

    =SUM(iferror([DATA.xlsx]Sheet1!$G$8:$G$12*([DATA.xlsx]Sheet1!$F$8:$F$12=TRANSPOSE([SUMMARY.xlsx]Sheet1!$C$8:$C$16)),))
    or
    =SUM(IFERROR(INDEX([DATA.xlsx]Sheet1!$G$8:$G$12,N(IF(1,MATCH([SUMMARY.xlsx]Sheet1!$C$8:$C$16,[DATA.xlsx]Sheet1!$F$8:$F$12,)))),))

  9. #9
    Forum Contributor
    Join Date
    06-10-2005
    MS-Off Ver
    2007
    Posts
    223

    Re: SUMPRODUCT syntax problems (to substitute SUMIFS)

    Hi Bo_Ry, I tried the first formula and tested it when the workbook was closed and that works great! I appreciate the help!! I think the other formulas are less complex as one tests for a single criteria and the other tests for two criteria. I will try and tweak what you sent and will see if I can get them to work.

  10. #10
    Forum Contributor
    Join Date
    06-10-2005
    MS-Off Ver
    2007
    Posts
    223

    Re: SUMPRODUCT syntax problems (to substitute SUMIFS)

    Hello, I tried various combinations using the SUMPRODUCT formula like the following with no luck:
    =SUMPRODUCT(--([external.xlsx]DATA!$E$12:$E$2000,">50000"),([external.xlsx]Data!$B$12:$B$2000))

    Similarly, I tried iterations of the formula provided by Bo_Ry without success.
    If I could ask for some additional help that would be great.

  11. #11
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: SUMPRODUCT syntax problems (to substitute SUMIFS)

    Try

    =SUMPRODUCT(--([external.xlsx]DATA!$E$12:$E$2000>50000),([external.xlsx]Data!$B$12:$B$2000))

  12. #12
    Forum Contributor
    Join Date
    06-10-2005
    MS-Off Ver
    2007
    Posts
    223

    Re: SUMPRODUCT syntax problems (to substitute SUMIFS)

    Amazing what a couple of misplaced quotation marks can do to a formula! Thanks Bo_Ry

+ 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. SUMIFS Syntax Problem
    By jcjc7 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-13-2017, 10:20 AM
  2. [SOLVED] SUMIFS Formula (Syntax question)
    By Keelin in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-29-2014, 06:19 PM
  3. [SOLVED] Indirect and substitute formua with sumifs
    By EmilyB in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-17-2014, 08:56 PM
  4. [SOLVED] sumifs and sumproduct problems
    By senile2 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-27-2013, 08:01 PM
  5. SUMPRODUCT SUBSTITUTE with Blank Cells
    By onesNzeros in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-07-2013, 09:51 AM
  6. Trouble with proper syntax for SUMIFS
    By JRay0108 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-21-2012, 08:24 PM
  7. [SOLVED] Looking for correct SUMIFS syntax
    By peri1224 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-20-2012, 11:16 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