My brain can't comprehend the logic - sumifs, index, match, sumproduct, multiple row, multiple column

shakethingsup

Board Regular
Joined
May 21, 2017
Messages
64
Office Version
  1. 365
Platform
  1. Windows
Hello there - I keep forgetting how to think about the logic of these functions. I tried to look across my other workbooks for formulas. I feel like I've done this before so I apologize but I couldn't find the formula hence why I"m posting.

I've searched and using these links and posts as references:
Sum INDEX-MATCH Across Multiple Columns with the Same Heading

Row/ColumnABCDEF
1YesYesYesNoYes
2Yes1020201010
3Yes2122232425
4Yes55555
5No11111
6Yes44444

My spreadsheet might end up being large so I was leaning towards sumifs and index.

Alternative 1:
Sumproduct(B2:F6*("yes"=A2:A6)*("yes"=B1:F1))

This works but I need it on a larger spreadsheet

Alternative 2:
=SUMIFS(INDEX(B2:F6,,,),INDEX(A2:A6,0,1),"yes",INDEX(B1:F1,1,0),"yes")

I can't think about how to structure alternative 2 properly. Can someone link me a post or help me understand alternative 2 and/or how I would go about this?
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Edit update:
Alternative 3 - sum as an array?
I think I figured it out?
=sum((B2:F6)*(--(A2:A6="yes")*(B1:F1="yes")
 
Upvote 0
It seems to me that both your alternative 1 in your OP and this #3 both return 187.
What's the issue?
 
Upvote 0
It seems to me that both your alternative 1 in your OP and this #3 both return 187.
What's the issue?
how do I get alternative 2 to work? It seems alternative 2 would be most efficient.

Also, alternative 3 seems to be running into issues on a larger spreadsheet? maybe because I need to ensure every cell has a numerical value in it? if that's the case, this seems cumbersome.
 
Upvote 0

Forum statistics

Threads
1,224,813
Messages
6,181,118
Members
453,021
Latest member
Justyna P

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