Subtotals and counta I think

Cowichandave

New Member
Joined
Jan 18, 2009
Messages
47
Office Version
  1. 2016
Problem finding formula that works best. Column A is salesrep column B is clientID and Column I is Last Year client purchased. Columns H:2 to 6 show combined total of year sold for all.
I would to subtotal for each rep EX If select AngelaZ she has 10 clients. I would to show her stats of years sold 2015 has 2 2016 has 4 2017 has 0 2018 has 3 2019 has 1
I tried different formulas with no sucess. Help please





Book1
ABCDEFGHI
1..
2201912
3 CLIENTS201810
4TOTALREP20176
5404020169
620153
7
8Sales Client Date Date Last SaleLast SaleLast Sale
9Seq Rep CID Created Last Sold Amount Days Years Year
105AngelaZDAV172015-08-312015-08-31105.0030178.32015
1112AngelaZLIS022015-08-272015-08-2865.0030208.32015
12918BobTSEA072015-10-292015-11-09197.4028247.72015
134AngelaZDAV0012016-03-072016-03-1165.0028207.72016
147AngelaZGER152016-03-142016-03-1565.0028137.72016
158AngelaZHYD052016-03-142016-03-22254.1027867.62016
1610AngelaZ451102016-03-182016-04-1868.2528177.72016
17648BobT2020P2016-10-212016-10-31315.0028137.72016
18652BobT537352001-09-042016-10-3189.2527897.62016
191012ChrisBALT142016-11-282016-12-07194.2528207.72016
201041ChrisBCPC032016-09-162016-10-01939.7519635.42016
211042ChrisBCYC072016-02-042016-01-15196.8819225.32016
22799BobTINN112016-09-082017-11-27212.1018415.02017
23813BobTLAP042017-05-302017-07-2868.2516794.62017
24814BobTLAT032016-04-272017-07-10409.5016574.52017
25824BobTLED182017-06-192017-06-22157.507021.92017
261005ChrisBAAA012017-02-282017-04-3055.022340.62017
271014ChrisBARN042017-01-162017-10-260.002070.62017
286AngelaZFYI012015-02-182018-07-20154.3534149.42018
299AngelaZJAC192018-08-092018-08-30164.8529478.12018
3014AngelaZNWS022016-03-162018-11-19-738.9925907.12018
31863BobTNAB02PX2003-07-082018-09-2468.2525907.12018
32866BobTNEK012018-02-222018-02-22209.9526917.42018
33868BobTNEW252017-07-062018-03-07-151.2028807.92018
341046ChrisBDIG032016-08-022018-05-180.0028747.92018
351066ChrisBGYM012018-11-052018-11-070.0028827.92018
361068ChrisBHGP012016-06-282018-08-27410.1325316.92018
371117ChrisBSHA292018-01-172018-01-24197.5225397.02018
383AngelaZCSI072019-04-182019-04-3099.7528707.92019
39841BobTLPS012017-09-252019-01-15837.9025316.92019
40854BobTMIN102017-09-272019-09-16-78.7525907.12019
41859BobTMTT012019-03-272019-03-2868.2525326.92019
42867BobTNEW222016-02-262019-10-31-52.5026517.32019
43880BobTOXY012018-06-252019-02-06399.0027757.62019
441003ChrisB766202000-09-302019-07-174183.2527627.62019
451027ChrisBCANCADD2016-04-212019-09-272633.1227287.52019
461033ChrisBCER092019-02-192019-02-22108.5728047.72019
471055ChrisBENCTEX2019-10-032019-11-150.0025747.12019
481058ChrisBFAR062015-10-062019-02-28687.3227757.62019
491072ChrisBIND112016-07-122019-11-29230.4826247.22019
Sheet3
Cell Formulas
RangeFormula
B5B5=COUNTA(B10:B25231)
C5C5=SUBTOTAL(3,C10:C49)
H2H2=COUNTIF($I$10:$I$49,"2019")
H3H3=COUNTIF($I$10:$I$49,"2018")
H4H4=COUNTIF($I$10:$I$49,"2017")
H5H5=COUNTIF($I$10:$I$49,"2016")
H6H6=COUNTIF($I$10:$I$49,"2015")
G10:G49G10=TODAY()-Table1[@[ Last Sold]]
H10:H49H10=Table1[@[ Days]]/365
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
If I understand you correctly, you want to get the total sales for an agent that were made within a time period e.g 2019 OR you want to get the total number of sales.

Total Value Of Sales - SUMIFS

Excel Formula:
=SUMIFS(sum_range, date_range, ">=01/01/YEAR", date_range, "<=12/31/YEAR", rep_range, rep_name)

Excel Formula:
=SUMIFS(Table1[Last Sold], ">=01/01/2019", Table1[Last Sold], "<=12/31/2019", Table1[Rep], "BobT")

Total Number Of Sales - COUNTIFS

Excel Formula:
=COUNTIFS(rep_range, rep_name, date_range, ">=01/01/year", date_range, "<=12/31/year")

Excel Formula:
=COUNTIFS(Table1 [Rep], "BobT", ">=01/01/2019", Table1[Last Sold], "<=12/31/2019", Table1[Rep], "BobT")
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,182
Members
452,615
Latest member
bogeys2birdies

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