Convert formula from =SUMIF to =SUMPRODUCT

Aaronawl

New Member
Joined
Sep 11, 2018
Messages
10
Hi,

I am trying to convert all my SUMIF formulas to SUMPRODUCT so that the referenced workbook does not need to be open.
I have tried myself but cannot seem to get it to work. Here is an example of the formula:

=SUMIFS('[Mileage Log 2018.xlsm]Advisors'!$D$4:$D$15,'[Mileage Log 2018.xlsm]Advisors'!$E$4:$E$15,$B$9,'[Mileage Log 2018.xlsm]Advisors'!$E$4:$E$15,$B$9)


B9 refers to a date [DD/MM/YY] which decides which day to sum the figures from.


I have tried the following adjustment but only seem ot get a #VALUE error:

=SUMPRODUCT(--('[Mileage Log 2018.xlsm]Advisors'!$D$4:$D$15),--('[Mileage Log 2018.xlsm]Advisors'!$E$4:$E$15,$B$9,'[Mileage Log 2018.xlsm]Advisors'!$E$4:$E$15,$B$9)


Many thanks in advance,
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Like this:

=SUMPRODUCT('[Mileage Log 2018.xlsm]Advisors'!$D$4:$D$15,--('[Mileage Log 2018.xlsm]Advisors'!$E$4:$E$15=$B$9))


That worked perfect! thank you. I've managed to adjust the similar formulas using your help.

There is another one i'm struggling with as it has 2 parameters that it searches for. Could you help me with:

=SUMIFS('[Mileage Log 2018.xlsm]DB, AH & KA'!$O$3:$O$200,'[Mileage Log 2018.xlsm]DB, AH & KA'!$K$3:$K$200,">="&$B$10,'[Mileage Log 2018.xlsm]DB, AH & KA'!$K$3:$K$200,"<="&$B$11)
 
Upvote 0
try:

=SUMPRODUCT(('[Mileage Log 2018.xlsm]DB, AH & KA'!$O$3:$O$200, ('[Mileage Log 2018.xlsm]DB, AH & KA'!$K$3:$K$200>=$B$10)*('[Mileage Log 2018.xlsm]DB, AH & KA'!$K$3:$K$200<=$B$11))
 
Upvote 0
That worked perfect! thank you. I've managed to adjust the similar formulas using your help.

Great to hear.

There is another one i'm struggling with as it has 2 parameters that it searches for. Could you help me with:

=SUMIFS('[Mileage Log 2018.xlsm]DB, AH & KA'!$O$3:$O$200,'[Mileage Log 2018.xlsm]DB, AH & KA'!$K$3:$K$200,">="&$B$10,'[Mileage Log 2018.xlsm]DB, AH & KA'!$K$3:$K$200,"<="&$B$11)

Still using the comma syntax...

=SUMPRODUCT('[Mileage Log 2018.xlsm]DB, AH & KA'!$O$3:$O$200,--('[Mileage Log 2018.xlsm]DB, AH & KA'!$K$3:$K$200>=$B$10),--('[Mileage Log 2018.xlsm]DB, AH & KA'!$K$3:$K$200<=$B$11))
 
Upvote 0

Forum statistics

Threads
1,223,975
Messages
6,175,749
Members
452,667
Latest member
vanessavalentino83

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