Forum Discussion
BFK
Jul 02, 2025Copper Contributor
Sumifs or other solution for both vertical & horizontal criteria
Hi all, I would like to sum values from a matrix of vertical critiera (e.g. names) and horizontal ones (dates as well as other criteria). I am not sure the sumifs formula can actually do this. So fa...
SergeiBaklan
Jul 07, 2025Diamond Contributor
Perhaps source data looks like
and expected answer
isn't it?
m_tarler
Jul 07, 2025Bronze Contributor
well maybe? I have attached your example data tables with an 'unpivot' and then repivot formulas:
- djclementsJul 08, 2025Silver Contributor
GROUPBY on both axes is also a potential option here:
=LET( Nz, LAMBDA(x,IF(ISBLANK(x),"",x)), y, TRANSPOSE(VSTACK(Nz(A3:F3),GROUPBY(Nz(A4:A8),B4:F8,SUM,3,0))), TRANSPOSE(GROUPBY(TAKE(y,,2),DROP(y,,2),SUM,3,0)) )