SUMIFS doesnot work with VSTACK and CHOOSECOLS?

ErikHorsthuis

New Member
Joined
Oct 22, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I am testing the new dynamic array functions (CHOOSECOLS and VSTACK) and I am trying to combine them with SUMIFS. I am trying to display in cell C2:D22 with SUMIFS the number of kudos from the respective student and sport. However, Excel does not allow up this formula. If I just run the SUMIFS formula on a table then of course it works. I'm afraid I'm overlooking something. Does anyone see what I am doing wrong? Thanks! I know that there are all kind of other approaches to solve this, I just want to know what is wrong in the formula.

=SUMIFS(CHOOSECOLS(VSTACK(Cycling,Running),4),CHOOSECOLS(VSTACK(Cycling,Running),1),A2#,CHOOSECOLS(VSTACK(Cycling,Running),3),C1#)
 

Attachments

  • Problem with SUMIFS.JPG
    Problem with SUMIFS.JPG
    198.7 KB · Views: 80

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
`SUMIFS()` 1st parameter needs to be a range reference.
 
Upvote 0
No both choosecols & vtstack return an array not a range.
 
Upvote 0
Solution
Adsız4.png


[KOD=vba]LET(m,VSTACK(F2:H6,J2:L6),DÜNYE YUKARI(A2:A6&B1:C1,INDEX(m,,1)&INDEX(m,,2),INDEX(m,,3) ))[/KOD]
 
Upvote 0
Formula B2

LET(m,VSTACK(F2:H6,J2:L6),XLOOKUP(A2:A6&B1:C1,INDEX(m,,1)&INDEX(m,,2),INDEX(m,,3)))
 
Upvote 0
What has that got to do with using sumifs?
 
Upvote 0
I think the person asking the question is asking the wrong question. Similar names do not appear in the G-J and L-O charts. Does he/she need to use sumifs..
 
Upvote 0
I encountered this issue also but this was my solution matching your formula:

Excel Formula:
=map(a2#,c1#,lambda(a,b,sumproduct(--(choosecols(vstack(cycling,running),1)=a)*(choosecols(vstack(cycling,running),3)=b),choosecols(cycling,running),4)))))

Map function is needed here as you have a multi condition, a single condition would only need a byrow/bycol function.

Hope that works for you.
 
Upvote 0

Forum statistics

Threads
1,215,417
Messages
6,124,791
Members
449,188
Latest member
Hoffk036

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