Sumproduct or alternative

stagnut

New Member
Joined
Sep 27, 2007
Messages
24
Hi,
I have been using a sumproduct formula for some years, and although it works fine I was wondering if there was an alternative way of getting the same result.

In C8 copied down =SUMPRODUCT(($A8>=$A$3:$A$4)*1,($B8<=$B$3:$B$4)*1,($C$3:$C$4)) to show how many are in each hour

StartFinishStaff
22:0004:0010
00:0006:0028
21:0022:000
22:0023:0010
23:0000:0010
00:0001:0038
01:0002:0038
02:0003:0038
03:0004:0038
04:0005:0028
05:0006:0028
06:0007:000
07:0008:000

<tbody>
</tbody>
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Is there some problem or issue that is causing you to question it and look for other solutions?
SUMPRODUCT formulas are usually some of the more efficient formulas out there, so if it is working the way you want, I would just leave it be.
If the issue is you have huge amounts of data, so the performance might be slow, your best alternative may be to use a database solution, like Access or SQL.
 
Upvote 0
There isn't any problem as all works well. It was something I cobbled together many years ago to count the number of occurrences in a time period pre and post midnight, and as I was just looking at Sumifs I wondered what the better one would be.
 
Upvote 0
From what I have read in the past, I believe that SUMIFS is not any more effiecient than SUMPRODUCT.
So if it is working, there is probably no real incentive to change it.
 
Upvote 0

Forum statistics

Threads
1,214,644
Messages
6,120,709
Members
448,983
Latest member
Joaquim_Baptista

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