Count times a specific day occurs between two dates

watertoe

New Member
Joined
Jan 17, 2019
Messages
2
I'm Looking for a formula that can count times a specific day occurs between two dates.

example:

Count the number of times the 11th day of the month occurs

start date - Oct 11, 2018
end date - Jan 11, 2019

answer would be 4



-thanks for your help
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Try

Book1
ABCD
1start10/11/2018answer
2end1/11/20194
Sheet1
Cell Formulas
RangeFormula
D2=SUMPRODUCT(--(DAY(ROW(INDIRECT(B1&":"&B2)))=11))
 
Upvote 0
This is a FUN question! Here's what I did...
A1 = StartDate
B1 = EndDate
C1 = NumberDay (e.g. 11)

A3 = YEAR(A1)


In Column E:
E1 = MONTH(A1)
E2 = E1 + 1 (and fill down as needed to E...)

In Column G:
G1 = DATE($A$3,E1,$C$1) (and fill down as needed to G...)

In Column H:
H1 = DAY(G1) (and fill down as needed to H...)

In column I:
I1 = IF(AND(G1>=$A$1,G1<=$B$1,$C$1=H1),1,0) (and fill down.... etc)

Then your sum of column I would be the number of times that day occurred in that time span.


:)
 
Upvote 0
instead of putting "11" in formula, can you do a cell ref so user can enter the number they want? Does that still work?
e.g. =SUMPRODUCT(--(DAY(ROW(INDIRECT(B1&":"&B2)))=D1)) [where D1 is user-input for day desired]

 
Upvote 0
instead of putting "11" in formula, can you do a cell ref so user can enter the number they want? Does that still work?
e.g. =SUMPRODUCT(--(DAY(ROW(INDIRECT(B1&":"&B2)))=D1)) [where D1 is user-input for day desired]


Yes that would work.
 
Upvote 0
instead of putting "11" in formula, can you do a cell ref so user can enter the number they want? Does that still work?
e.g. =SUMPRODUCT(--(DAY(ROW(INDIRECT(B1&":"&B2)))=D1)) [where D1 is user-input for day desired]


Thank you everyone for your help, this has been a great solution!
 
Upvote 0

Forum statistics

Threads
1,214,932
Messages
6,122,332
Members
449,077
Latest member
jmsotelo

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