Count Based on Quarter

kumara_faith

Well-known Member
Joined
Aug 19, 2006
Messages
926
Office Version
  1. 365
Hi,

I have the following table:

Table 1Table 2
YearMonthSales StaffYearQ1Q2Q3Q4
2021JanMary20214312
2021JanJohn2022121
2021FebKelly
2021MarClancy
2021AprMaret
2021MayJuarez
2021JunMartin
2021JulAmy
2021Aug
2021Sep
2021Oct
2021NovHuang
2021DecLuke
2022Jan
2022Feb
2022MarNumez
2022AprAndrian
2022May
2022JunJoe
2022Jul
2022AugManny
2022Sep
2022Oct
2022Nov
2022Dec

Table 1 is the raw data. In Table 2, I am trying to summarize the number of sales staff based on quarter for year 2021 and 2022. Is there a formula that I could use to achieve this as the actual raw data is very long.

Appreciate any help.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
18.xlsm
ABCDEFGHI
1Table 1Table 2
2YearMonthSales StaffYearQ1Q2Q3Q4
32021JanMary20214312
42021JanJohn20221210
52021FebKelly
62021MarClancy
72021AprMaret
82021MayJuarez
92021JunMartin
102021JulAmy
112021Aug
122021Sep
132021Oct
142021NovHuang
152021DecLuke
162022Jan
172022Feb
182022MarNumez
192022AprAndrian
202022May
212022JunJoe
222022Jul
232022AugManny
242022Sep
252022Oct
262022Nov
272022Dec
Sheet2
Cell Formulas
RangeFormula
F3:I4F3=SUMPRODUCT(--(DATEVALUE(1&$B$3:$B$27&$A$3:$A$27)<=EOMONTH(DATE($E3,MATCH(F$2,$F$2:$I$2,0)*3,1),0))*($C$3:$C$27<>"")*($A$3:$A$27=$E3))-SUM($E3:E3)+$E3
 
Upvote 0
Solution
Hi bebo,

Thank you for the solution and it worked. Appreciate it and have a great day ahead.
 
Upvote 0

Forum statistics

Threads
1,215,770
Messages
6,126,791
Members
449,336
Latest member
p17tootie

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