Forum Discussion
djs72
May 09, 2023Copper Contributor
Script to count and total varying window sizes
Hi. I'm working on a spreadsheet and I want to create a script where it will look at the plan name (Column A), then take the window sizes from Columns B and C and the Optional "z" and total them ...
djs72
May 09, 2023Copper Contributor
Thanks Quadruple! This looks interesting and I'll give it a shot as well
OliverScheurich
May 10, 2023Gold Contributor
=LET(range,A2:D17,rangeunique,UNIQUE(IF(range="","",range)),HSTACK(rangeunique,MAP(CHOOSECOLS(rangeunique,1),CHOOSECOLS(rangeunique,2),CHOOSECOLS(rangeunique,3),CHOOSECOLS(rangeunique,4),LAMBDA(colF,colG,colH,colI,SUMPRODUCT((CHOOSECOLS(range,1)=colF)*(CHOOSECOLS(range,2)=colG)*(CHOOSECOLS(range,3)=colH)*(CHOOSECOLS(range,4)=colI))))))With Office 365 or Excel for the web you can apply this formula.