Sumifs table by header row and column criteria

lilguitargal

New Member
Joined
Jan 28, 2025
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hello,

I'm struggling with the sumif function on a table.
I want to be able to sum a range based on the header row, and two column criteria (Sub Type and Prod).

To get the sum value of Apple in Act Jan for Tag1 - I tried the formula below
=SUMIFS(Table3,Table3[#Headers],I5,Table3[Sub Type],H7,Table3[Prod],H6)
But it returns a #VALUE error.

Can anyone help me understand why this doesn't work and how to fix it?
I am using table references because I want the sumif to be dynamic - so that I can sum all of the fruit by Month and tag and product.
This is a small version of the table (it's actual many more rows and columns), but I thought I'd try a smaller one to see if it would work but to no avail.
 

Attachments

  • Screenshot 2025-01-29 085440.png
    Screenshot 2025-01-29 085440.png
    17.5 KB · Views: 4

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Hi & welcome to MrExcel.
How about
Excel Formula:
=SUMPRODUCT((Table3[#Headers]=I5)*(Table3[Sub Type]=H7)*(Table3[Prod]=H6)*Table3)
 
Upvote 0
You're welcome & thanks for the feedback.
I think I'm having a mind blank - but I just realized this counts instead of sums
=SUMPRODUCT((Table3[#Headers]=I5)*(Table3[Sub Type]=H7)*(Table3[Prod]=H6))
Giving the answer of 2
Is there a way to edit this formula to give 27?
 
Upvote 0
I think I'm having a mind blank - but I just realized this counts instead of sums
=SUMPRODUCT((Table3[#Headers]=I5)*(Table3[Sub Type]=H7)*(Table3[Prod]=H6))
Giving the answer of 2
Is there a way to edit this formula to give 27?
sorry I missed the '*Table3' at the end and now added it in
=SUMPRODUCT((Table3[#Headers]=I5)*(Table3[Sub Type]=H7)*(Table3[Prod]=H6)*Table3)

But it still get the #VALUE :(
 
Upvote 0
Multiplying by Table3 only causes a mismatch in the array dimension. Grab the value columns. Try:
Excel Formula:
=SUM((Table3[Sub Type]=H7)*(Table3[Prod]=H6)*(Table3[[#Headers],[Act Jan]:[Act Mar]]=I5)*Table3[[Act Jan]:[Act Mar]])
 
Upvote 0
Multiplying by Table3 only causes a mismatch in the array dimension. Grab the value columns. Try:
Excel Formula:
=SUM((Table3[Sub Type]=H7)*(Table3[Prod]=H6)*(Table3[[#Headers],[Act Jan]:[Act Mar]]=I5)*Table3[[Act Jan]:[Act Mar]])
Thank you!
I definitely need to look into some online Excel courses.
 
Upvote 0
Another option with sumproduct is
Excel Formula:
=SUMPRODUCT((Table3[#Headers]=K5)*(Table3[Sub Type]=H7)*(Table3[Prod]=H8),Table3)
 
Upvote 0

Forum statistics

Threads
1,226,017
Messages
6,188,439
Members
453,474
Latest member
th9r

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top