G
Guest
I need a formula or process that allows you to determine the number of
specific days (Mondays, Tuesdays, etc) between two dates.
specific days (Mondays, Tuesdays, etc) between two dates.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
=SUM(--(WEEKDAY(A2-1+ROW(INDIRECT("1:"&TRUNC(B2-A2)+1)))=C2))
Bob Phillips said:Here is a formula from Daniel M
=SUM(--(WEEKDAY(A2-1+ROW(INDIRECT("1:"&TRUNC(B2-A2)+1)))=C2))
A2, B2 are the 2 dates, C2 is the day of the week (1=Sun, 2=Mon, etc.)
It is an array formula, so commit with Ctrl-Shift-Enter.
--
HTH
RP
(remove nothere from the email address if mailing direct)

Bob Phillips said:Assuming the dates are in A1 and B1, this will return the number of Mondays
in January
=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&B1)),2)=1),--(MONTH(ROW(INDIRECT(
A1&":"&B1)))=1))
The first = 1 refers to the weekday (1 through 7 for Mon through Sun), the
second refers to the month number.
--
HTH
RP
(remove nothere from the email address if mailing direct)
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.