Excel INDIRECT formula nested within SUMPRODUCT returning zero values

Dan O 40 Reputation points
2026-05-27T15:00:08.1166667+00:00

Have workbook with multiple tabs for each week, want to sum total $'s billed by Client / Subcontractor.
Set up Table named "Weeks" with "Week Number" column referencing each tab.
Formula shown below, where Column 'c' references $'s Billed, Column 'a' references Client, and Column 'e' references Subcontractor.
=IFERROR(SUMPRODUCT(SUMIFS(INDIRECT("'"&Weeks[Week Number]&"'!c:c"),INDIRECT("'"&Weeks[Week Number]&"'!a:a"),$A21,INDIRECT("'"&Weeks[Week Number]&"'!e:e"),$E21)),)

Microsoft 365 and Office | Excel | For business | Windows

Answer accepted by question author
Ashish Mathur 102.5K Reputation points Volunteer Moderator
2026-05-28T23:12:47.5633333+00:00

Hi,

In range J2:J4 of the Recap worksheet, type Week23, Week24 and Week25. In cell C2, enter this formula and drag down

=SUMPRODUCT(SUMIF(INDIRECT("'"&$J$2:$J$4&"'!A2:A100"),A2,INDIRECT("'"&$J$2:$J$4&"'!C2:C100")))

Hope this helps.

User's image

Was this answer helpful?

1 person found this answer helpful.

Answer accepted by question author
Hendrix-C 20,015 Reputation points Microsoft External Staff Moderator
2026-05-27T16:36:45.3533333+00:00

Hi @Dan O,

Based on your sharing, it's because that the IFERROR() is hiding the error result and return "0" when the inner formula is actually returning #VALUE! or #REF!.

Therefore, to debug this issue, I suggest you should temporarily remove IFERROR and see what is the actual result that the inner formula returns. Please share me the formula outcome and if possible, some screenshots of the data table structure so I can better understand about the situation and provide the best possible assistance for your concern.

Please understand that my initial response may not always resolve the issue immediately. However, with your help and more detailed information, we can work together to find a solution. 

Thank you for your understanding and cooperation. I look forward to hearing from you. 


Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

Was this answer helpful?

1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. IlirU 2,651 Reputation points Volunteer Moderator
    2026-05-28T07:03:01.5366667+00:00

    User's image

    Hi @Dan O

    (if I understand correctly what you're looking for)

    In cell C2 of the Recap sheet, apply the following formula:

    =LET(
         weeks, VSTACK(Table2, Week24!A2:H12, Week25!A2:H8),
        Client, TRIM(CHOOSECOLS(weeks, 1)),
    inv_Client, TRIM(CHOOSECOLS(weeks, 3)),
           Sub, TRIM(CHOOSECOLS(weeks, 5)),
                BYROW(A2:A5 & E2:E5, LAMBDA(a, SUM(
                      --FILTER(inv_Client, Client & Sub = TRIM(a))))
                      )
    )
    

    In cell F2 of the Recap sheet, apply the following formula:

    =LET(
         weeks, VSTACK(Table2, Week24!A2:H12, Week25!A2:H8),
        Client, TRIM(CHOOSECOLS(weeks, 1)),
       inv_Sub, TRIM(CHOOSECOLS(weeks, 6)),
           Sub, TRIM(CHOOSECOLS(weeks, 5)),
                BYROW(A2:A5 & E2:E5, LAMBDA(a, SUM(
                      --FILTER(inv_Sub, Client & Sub = TRIM(a))))
                      )
    )
    

    HTH

    IlirU

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.