B
Bill
How do I calculate how many times a given date 11/13 occured on a Friday
since 1953 to present?
since 1953 to present?
Bill said:How do I calculate how many times a given date 11/13 occured on a Friday
since 1953 to present?
Glenn said:=SUM(IF(WEEKDAY(DATE(ROW(1953:2008),11,13))=6,1,0))
*** Array Formula - Commit with CTRL+SHIFT+ENTER ***
How do I calculate how many times a given date 11/13 occured on a Friday
since 1953 to present?
It's 2009 now![]()
Hi,
You can use the following array formula: (press Shift+Ctrl+Enter)
=SUM(--(MOD(DATE(ROW(53:108),11,13),7)=6))
or its not array equivalent
=SUMPRODUCT(--(MOD(DATE(ROW(53:108),11,13),7)=6))
However, these solution will need to be adjusted on 11/13 or each year.
Here is a formula that eliminates that need and works far into the future:
=SUMPRODUCT(--(MOD(DATE(ROW(53:199),11,13),7)=6),--(DATE(ROW(53:199),11,13)<=TODAY()))
--
If this helps, please click the Yes button
Cheers,
Shane Devenshire
- Show quoted text -
...although using MOD instead of WEEKDAY means you could get the wrong
result if you are using 1904 date system............
This formula is less efficient because it examines every day but it'll
give the correct number from 1st Jan 1953 to the current date
=SUMPRODUCT(--(TEXT(ROW(INDIRECT(DATE(1953,1,1)&":"&TODAY())),"ddd-dd-
mmm")="Fri-13-Nov"))
How do I calculate how many times a given date 11/13 occured on a Friday
since 1953 to present?
That formula assumes that the "ddd-abbrevation" for Friday is "Fri"
and the "mmm-abbreviation" for November is "Nov" which is dependant on
language settings of the individual computer so I would not recommend
that one.
To be on the safe side you could replace "Fri-13-Nov" with
TEXT(DATE(1998,11,13),"ddd-dd-mmm")
But in my Excel you have to write "MMM" instead of "mmm" so maybe it
is not 100% safe anyway if the formatting codes are also language
dependant.
Hope this helps / Lars-Åke- Hide quoted text -
- Show quoted text -
But why would you restrict it, especially to 2008. Why not be dynamic?
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.