Converting array formula sum on sumproduct

Konrado

New Member
Joined
Jun 17, 2014
Messages
34
Welcome
I just wondering if it is possible to change array formula as below on normal formula sumproduct.

=SUM(($A$3:$A$11=$F$17)*IF(G17<>"All";$B$3:$B$11=G17;1)*($C$1:$Z$1=$H$17)*CHOOSE($K$17;$C$2:$Z$2=$I$17;$C$2:$Z$2<=$I$17;$C$2:$Z$2>$I$17)*($C$3:$Z$11)) (J19 - 5914 value as below)

Above formula refers to set of data. Using some criteria I can count value. Text start is in A1. Thanks in advance!
StartActActActActActActActActActActActActOutOutOutOutOutOutOutOutOutOutOutOut
DepCC123456789101112123456789101112
A120029299371626099599777726960242496840863167941434259852013353291345135
A12003307275976053459203992084293943424355675786881544966224028264352486
A100074666893792448979538990757073216146095932073801963985135823371980796
A100019858895536624232200225946110640495703487868443766032015551639215633
B120065153495617059740657890874582136382841565387654780056022712375972792999
B100028434189823942259944624322326741596966828523581742761422332763710755147
B10002175843813462229996153591612459249443583122511840735512632605494286
C12009736977998984142332325743336779088147083861073944872897439920700991125
C10002133203705123644382368447277274651641335314964030647627127113816308173
Monthly1
YTD2
YTG3
DepCCSort of #Curr MonM/YTD/YTG
A1000Out4YTG3
Total5 914

<colgroup><col span="9"><col><col span="16"></colgroup><tbody>
</tbody>
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
You could try this, note: all this saves is CTRL+SHIFT+ENTER, it is still array processing in nature.

Code:
=SUMPRODUCT(C3:Z11*(C1:Z1=H17)*(A3:A11=F17)*(((C2:Z2=I17)*(K17=1))+((C2:Z2<=I17)*(K17=2))+((C2:Z2>I17)*(K17=3)))*((B3:B11=G17)+(G17="All")))

If you are looking for an improvement in performance, your array formula can probably be written in a better/more efficient way.
 
Upvote 0
Hi FormR

Thank you for posting, your answer is really helpful. Do you have any clue how to make my formula faster?
 
Upvote 0
Do you have any clue how to make my formula faster?

Hi, I think your best bet would be to try using a helper column, for example:

In cell AA3 copied down:

Code:
=IF(AND(A3=$F$17;OR(B3=$G$17;$G$17="All"));SUMIFS(C3:Z3;$C$1:$Z$1;$H$17;$C$2:$Z$2;INDEX({"=";"<=";">"};$K$17)&$I$17);0)

And then in cell J19:

Code:
=SUM(AA:AA)
 
Upvote 0

Forum statistics

Threads
1,215,071
Messages
6,122,964
Members
449,094
Latest member
Anshu121

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