Count occurrences occurring by Month, Quarter & Year

jolthof7

New Member
Joined
Jan 29, 2014
Messages
14
Hello-
I have 2 columns
Column A list of dates
Column B color type

I need to determine how many times red shows up in a month, then quarter, then year.

I'm stumped.

Thanks much!
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
In your Column B are the cells colored using 1) Format, Fill Color or 2) Conditional Formatting?
 
Upvote 0
No formatting in Column B. Its just an entry of Red, Green or Blue.
Essentially, I need to know how many reds were in Jan 2018, Feb 2018, Mar 2018 etc..., then how many blues Jan 2018, Feb 2018, Mar 2018 etc.... etc.
Then i need to know the same but by Quarter, then Year
thank you!
 
Upvote 0
I mocked this up for you.

Copy the formulas in Columns F H and J downwards.

[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]
Book1
ABCDEFGHIJ
1datecolourredmonthcountquartercountyearcount
21/01/18red121220186
31/17/18green202220191
42/02/18orange3031
52/18/18yellow4142
63/06/18orange51
73/22/18yellow60
84/07/18red70
94/23/18blue81
105/09/18red90
115/25/18blue100
126/10/18blue111
136/26/18green121
147/12/18orange
157/28/18yellow
168/13/18orange
178/29/18red
189/14/18blue
199/30/18yellow
2010/16/18green
2111/01/18red
2211/17/18blue
2312/03/18red
2412/19/18yellow
251/04/19red
261/20/19green
272/05/19orange
Sheet53
Cell Formulas
RangeFormula
J2=SUMPRODUCT(--($B$2:$B$27=$D$1)*(YEAR($A$2:$A$27)=I2))
H2=SUMPRODUCT(--($B$2:$B$27=$D$1)*(ROUNDUP(MONTH($A$2:$A$27)/3,0)=G2))
F2=SUMPRODUCT(--($B$2:$B$27=$D$1)*(MONTH($A$2:$A$27)=E2))
A3=A2+16
[/FONT]
 
Upvote 0
_mM0DE
WOW! Everyone is so nice offering me support. I should have been more clear in my question. I need a formula for everything in yellow. Link is to a pic in my shutterfly. not sure how to attach here within the text.

_mM0DE
https://pix.sfly.com/_mM0DE
 
Upvote 0
I mocked this up for you.

Copy the formulas in Columns F H and J downwards.

ABCDEFGHIJ
1datecolourredmonthcountquartercountyearcount
21/01/18red121220186
31/17/18green202220191
42/02/18orange3031
52/18/18yellow4142
63/06/18orange51
73/22/18yellow60
84/07/18red70
94/23/18blue81
105/09/18red90
115/25/18blue100
126/10/18blue111
136/26/18green121
147/12/18orange
157/28/18yellow
168/13/18orange
178/29/18red
189/14/18blue
199/30/18yellow
2010/16/18green
2111/01/18red
2211/17/18blue
2312/03/18red
2412/19/18yellow
251/04/19red
261/20/19green
272/05/19orange

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet53

Worksheet Formulas
CellFormula
J2=SUMPRODUCT(--($B$2:$B$27=$D$1)*(YEAR($A$2:$A$27)=I2))
H2=SUMPRODUCT(--($B$2:$B$27=$D$1)*(ROUNDUP(MONTH($A$2:$A$27)/3,0)=G2))
F2=SUMPRODUCT(--($B$2:$B$27=$D$1)*(MONTH($A$2:$A$27)=E2))
A3=A2+16

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

Hi DrSteel,
Im having trouble with the months and quarters. the formula is reading 1 as January but adding both 2018 and 2019 january together. I need these separated. The same thing is occurring with Quarters.
thank you!!!!
 
Upvote 0

Forum statistics

Threads
1,214,611
Messages
6,120,513
Members
448,967
Latest member
screechyboy79

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