Counting dates in one column that are earlier than another column summing their dollar values

Nebulous

New Member
Joined
Oct 7, 2015
Messages
37
In the worksheet below, I need the count and dollar value totals of lines in Column B that are the same as or earlier than Column A to be reported in E2 and F2.

I tried with various attempts at COUNTIF but failed. I'm not an Excel expert - Intermediate at best.

NOTE: There will be blank cells as there are in this table, though they may not always be sorted to the bottom of the list as they are here.


ABCDEFG
1PDSDCostSD PDSLDollar Total
210/14/169/30/16$5,869.46
310/14/169/30/16$11,096.99
410/7/1610/3/16$6,043.00
510/7/1610/3/16$3,416.44
611/21/1611/14/16$6,043.00
711/21/168/14/16$8,185.76
811/18/1611/14/16$8,008.80
911/18/1611/14/16$11,096.99
1012/2/1611/14/16$5,557.04
1112/16/1611/14/16$3,416.44
1211/18/1611/14/16$5,869.46
1312/9/16$7,936.66
1412/9/16$7,936.66
1512/9/16$7,936.66
1612/9/16$72,122.30
1712/9/16$69,936.89
1812/9/16$69,936.89
1912/9/16$13,237.83
2011/30/16$84,215.12
211/23/17$84,309.02
221/27/17$84,309.02
232/8/17$92,369.53
242/10/17$90,243.89
252/10/17$90,227.02

<tbody>
</tbody>
Thanks!

~N
 
For performance reasons, you may wish to use an upper limit, say B2:B1000. Whatever makes sense for your data. If you use an entire column reference, the formula has to look at over a million rows each time it calculates, which can take some time. COUNTIFS and SUMIFS are more efficient with whole column references, but they can't do everything that SUMPRODUCT can either.

Glad we could help!
 
Upvote 0

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Good point, Eric. Though I could potentially have 1000s of rows, I wouldn't have millions. I'll cap it at 10,000 which may provide at least some performance improvement.
 
Upvote 0
Maybe I am missing the point but countif and sumif seem to work for me. The formula in E2 is "=COUNTIF($B$2:$B$12,"<="&A2)" and the formula in F2 is "=SUMIF($B$2:$B$25,"<="&A2,$C$2:$C$25)"
 
Upvote 0

Forum statistics

Threads
1,215,428
Messages
6,124,832
Members
449,190
Latest member
rscraig11

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