+ Reply to Thread
Results 1 to 26 of 26

Counting a day of the week

  1. #1
    N Harkawat
    Guest

    Re: Counting a day of the week

    =SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&B1)))=6))
    where cell a1 holds the date 6/14/05 and b1 holds 6/29/05

    "L_n_da" <[email protected]> wrote in message
    news:[email protected]...
    >I need to count the number of Fridays in a range of dates, e.g. how many
    > Fridays between 14 June 05 and 29 June 05 (including these two days). I'd
    > be
    > very grateful for your help.




  2. #2
    L_n_da
    Guest

    Counting a day of the week

    I need to count the number of Fridays in a range of dates, e.g. how many
    Fridays between 14 June 05 and 29 June 05 (including these two days). I'd be
    very grateful for your help.

  3. #3
    Ron Rosenfeld
    Guest

    Re: Counting a day of the week

    On Wed, 25 May 2005 12:43:25 -0700, L_n_da <[email protected]>
    wrote:

    >I need to count the number of Fridays in a range of dates, e.g. how many
    >Fridays between 14 June 05 and 29 June 05 (including these two days). I'd be
    >very grateful for your help.



    A1: Start Date
    A2: End Date

    =INT((A2-WEEKDAY(A2-5)-A1+8)/7)

    In general:

    =INT((A2-WEEKDAY(A2+1-DOW)-A1+8)/7)

    where DOW is replaced by the Day of the Week where Sunday=1 and Saturday=7.




    --ron

  4. #4
    Gnasher
    Guest

    Re: Counting a day of the week

    In article <[email protected]>,
    [email protected] says...
    > I need to count the number of Fridays in a range of dates, e.g. how many
    > Fridays between 14 June 05 and 29 June 05 (including these two days). I'd be
    > very grateful for your help.
    >

    =INT((Finish-Start)/7)+IF(OR(WEEKDAY(Start-6)>WEEKDAY(Finish-6),WEEKDAY
    (Finish)=6),1,0)

    seems to work!

  5. #5
    Gnasher
    Guest

    Re: Counting a day of the week

    In article <[email protected]>,
    [email protected] says...
    > I need to count the number of Fridays in a range of dates, e.g. how many
    > Fridays between 14 June 05 and 29 June 05 (including these two days). I'd be
    > very grateful for your help.
    >

    =INT((Finish-Start)/7)+IF(OR(WEEKDAY(Start-6)>WEEKDAY(Finish-6),WEEKDAY
    (Finish)=6),1,0)

    seems to work!

  6. #6
    Gnasher
    Guest

    Re: Counting a day of the week

    In article <[email protected]>,
    [email protected] says...
    > I need to count the number of Fridays in a range of dates, e.g. how many
    > Fridays between 14 June 05 and 29 June 05 (including these two days). I'd be
    > very grateful for your help.
    >

    =INT((Finish-Start)/7)+IF(OR(WEEKDAY(Start-6)>WEEKDAY(Finish-6),WEEKDAY
    (Finish)=6),1,0)

    seems to work!

  7. #7
    Gnasher
    Guest

    Re: Counting a day of the week

    In article <[email protected]>,
    [email protected] says...
    > I need to count the number of Fridays in a range of dates, e.g. how many
    > Fridays between 14 June 05 and 29 June 05 (including these two days). I'd be
    > very grateful for your help.
    >

    =INT((Finish-Start)/7)+IF(OR(WEEKDAY(Start-6)>WEEKDAY(Finish-6),WEEKDAY
    (Finish)=6),1,0)

    seems to work!

  8. #8
    Gnasher
    Guest

    Re: Counting a day of the week

    In article <[email protected]>,
    [email protected] says...
    > I need to count the number of Fridays in a range of dates, e.g. how many
    > Fridays between 14 June 05 and 29 June 05 (including these two days). I'd be
    > very grateful for your help.
    >

    =INT((Finish-Start)/7)+IF(OR(WEEKDAY(Start-6)>WEEKDAY(Finish-6),WEEKDAY
    (Finish)=6),1,0)

    seems to work!

  9. #9
    Gnasher
    Guest

    Re: Counting a day of the week

    In article <[email protected]>,
    [email protected] says...
    > I need to count the number of Fridays in a range of dates, e.g. how many
    > Fridays between 14 June 05 and 29 June 05 (including these two days). I'd be
    > very grateful for your help.
    >

    =INT((Finish-Start)/7)+IF(OR(WEEKDAY(Start-6)>WEEKDAY(Finish-6),WEEKDAY
    (Finish)=6),1,0)

    seems to work!

  10. #10
    Gnasher
    Guest

    Re: Counting a day of the week

    In article <[email protected]>,
    [email protected] says...
    > I need to count the number of Fridays in a range of dates, e.g. how many
    > Fridays between 14 June 05 and 29 June 05 (including these two days). I'd be
    > very grateful for your help.
    >

    =INT((Finish-Start)/7)+IF(OR(WEEKDAY(Start-6)>WEEKDAY(Finish-6),WEEKDAY
    (Finish)=6),1,0)

    seems to work!

  11. #11
    Gnasher
    Guest

    Re: Counting a day of the week

    In article <[email protected]>,
    [email protected] says...
    > I need to count the number of Fridays in a range of dates, e.g. how many
    > Fridays between 14 June 05 and 29 June 05 (including these two days). I'd be
    > very grateful for your help.
    >

    =INT((Finish-Start)/7)+IF(OR(WEEKDAY(Start-6)>WEEKDAY(Finish-6),WEEKDAY
    (Finish)=6),1,0)

    seems to work!

  12. #12
    Gnasher
    Guest

    Re: Counting a day of the week

    In article <[email protected]>,
    [email protected] says...
    > I need to count the number of Fridays in a range of dates, e.g. how many
    > Fridays between 14 June 05 and 29 June 05 (including these two days). I'd be
    > very grateful for your help.
    >

    =INT((Finish-Start)/7)+IF(OR(WEEKDAY(Start-6)>WEEKDAY(Finish-6),WEEKDAY
    (Finish)=6),1,0)

    seems to work!

  13. #13
    Gnasher
    Guest

    Re: Counting a day of the week

    In article <[email protected]>,
    [email protected] says...
    > I need to count the number of Fridays in a range of dates, e.g. how many
    > Fridays between 14 June 05 and 29 June 05 (including these two days). I'd be
    > very grateful for your help.
    >

    =INT((Finish-Start)/7)+IF(OR(WEEKDAY(Start-6)>WEEKDAY(Finish-6),WEEKDAY
    (Finish)=6),1,0)

    seems to work!

  14. #14
    Gnasher
    Guest

    Re: Counting a day of the week

    In article <[email protected]>,
    [email protected] says...
    > I need to count the number of Fridays in a range of dates, e.g. how many
    > Fridays between 14 June 05 and 29 June 05 (including these two days). I'd be
    > very grateful for your help.
    >

    =INT((Finish-Start)/7)+IF(OR(WEEKDAY(Start-6)>WEEKDAY(Finish-6),WEEKDAY
    (Finish)=6),1,0)

    seems to work!

  15. #15
    Gnasher
    Guest

    Re: Counting a day of the week

    In article <[email protected]>,
    [email protected] says...
    > I need to count the number of Fridays in a range of dates, e.g. how many
    > Fridays between 14 June 05 and 29 June 05 (including these two days). I'd be
    > very grateful for your help.
    >

    =INT((Finish-Start)/7)+IF(OR(WEEKDAY(Start-6)>WEEKDAY(Finish-6),WEEKDAY
    (Finish)=6),1,0)

    seems to work!

  16. #16
    Gnasher
    Guest

    Re: Counting a day of the week

    In article <[email protected]>,
    [email protected] says...
    > I need to count the number of Fridays in a range of dates, e.g. how many
    > Fridays between 14 June 05 and 29 June 05 (including these two days). I'd be
    > very grateful for your help.
    >

    =INT((Finish-Start)/7)+IF(OR(WEEKDAY(Start-6)>WEEKDAY(Finish-6),WEEKDAY
    (Finish)=6),1,0)

    seems to work!

  17. #17
    Gnasher
    Guest

    Re: Counting a day of the week

    In article <[email protected]>,
    [email protected] says...
    > I need to count the number of Fridays in a range of dates, e.g. how many
    > Fridays between 14 June 05 and 29 June 05 (including these two days). I'd be
    > very grateful for your help.
    >

    =INT((Finish-Start)/7)+IF(OR(WEEKDAY(Start-6)>WEEKDAY(Finish-6),WEEKDAY
    (Finish)=6),1,0)

    seems to work!

  18. #18
    Gnasher
    Guest

    Re: Counting a day of the week

    In article <[email protected]>,
    [email protected] says...
    > I need to count the number of Fridays in a range of dates, e.g. how many
    > Fridays between 14 June 05 and 29 June 05 (including these two days). I'd be
    > very grateful for your help.
    >

    =INT((Finish-Start)/7)+IF(OR(WEEKDAY(Start-6)>WEEKDAY(Finish-6),WEEKDAY
    (Finish)=6),1,0)

    seems to work!

  19. #19
    Gnasher
    Guest

    Re: Counting a day of the week

    In article <[email protected]>,
    [email protected] says...
    > I need to count the number of Fridays in a range of dates, e.g. how many
    > Fridays between 14 June 05 and 29 June 05 (including these two days). I'd be
    > very grateful for your help.
    >

    =INT((Finish-Start)/7)+IF(OR(WEEKDAY(Start-6)>WEEKDAY(Finish-6),WEEKDAY
    (Finish)=6),1,0)

    seems to work!

  20. #20
    Gnasher
    Guest

    Re: Counting a day of the week

    In article <[email protected]>,
    [email protected] says...
    > I need to count the number of Fridays in a range of dates, e.g. how many
    > Fridays between 14 June 05 and 29 June 05 (including these two days). I'd be
    > very grateful for your help.
    >

    =INT((Finish-Start)/7)+IF(OR(WEEKDAY(Start-6)>WEEKDAY(Finish-6),WEEKDAY
    (Finish)=6),1,0)

    seems to work!

  21. #21
    Gnasher
    Guest

    Re: Counting a day of the week

    In article <[email protected]>,
    [email protected] says...
    > I need to count the number of Fridays in a range of dates, e.g. how many
    > Fridays between 14 June 05 and 29 June 05 (including these two days). I'd be
    > very grateful for your help.
    >

    =INT((Finish-Start)/7)+IF(OR(WEEKDAY(Start-6)>WEEKDAY(Finish-6),WEEKDAY
    (Finish)=6),1,0)

    seems to work!

  22. #22
    Gnasher
    Guest

    Re: Counting a day of the week

    In article <[email protected]>,
    [email protected] says...
    > I need to count the number of Fridays in a range of dates, e.g. how many
    > Fridays between 14 June 05 and 29 June 05 (including these two days). I'd be
    > very grateful for your help.
    >

    =INT((Finish-Start)/7)+IF(OR(WEEKDAY(Start-6)>WEEKDAY(Finish-6),WEEKDAY
    (Finish)=6),1,0)

    seems to work!

  23. #23
    Gnasher
    Guest

    Re: Counting a day of the week

    In article <[email protected]>,
    [email protected] says...
    > I need to count the number of Fridays in a range of dates, e.g. how many
    > Fridays between 14 June 05 and 29 June 05 (including these two days). I'd be
    > very grateful for your help.
    >

    =INT((Finish-Start)/7)+IF(OR(WEEKDAY(Start-6)>WEEKDAY(Finish-6),WEEKDAY
    (Finish)=6),1,0)

    seems to work!

  24. #24
    Gnasher
    Guest

    Re: Counting a day of the week

    In article <[email protected]>,
    [email protected] says...
    > I need to count the number of Fridays in a range of dates, e.g. how many
    > Fridays between 14 June 05 and 29 June 05 (including these two days). I'd be
    > very grateful for your help.
    >

    =INT((Finish-Start)/7)+IF(OR(WEEKDAY(Start-6)>WEEKDAY(Finish-6),WEEKDAY
    (Finish)=6),1,0)

    seems to work!

  25. #25
    Gnasher
    Guest

    Re: Counting a day of the week

    In article <[email protected]>,
    [email protected] says...
    > I need to count the number of Fridays in a range of dates, e.g. how many
    > Fridays between 14 June 05 and 29 June 05 (including these two days). I'd be
    > very grateful for your help.
    >

    =INT((Finish-Start)/7)+IF(OR(WEEKDAY(Start-6)>WEEKDAY(Finish-6),WEEKDAY
    (Finish)=6),1,0)

    seems to work!

  26. #26
    Gnasher
    Guest

    Re: Counting a day of the week

    In article <[email protected]>,
    [email protected] says...
    > I need to count the number of Fridays in a range of dates, e.g. how many
    > Fridays between 14 June 05 and 29 June 05 (including these two days). I'd be
    > very grateful for your help.
    >

    =INT((Finish-Start)/7)+IF(OR(WEEKDAY(Start-6)>WEEKDAY(Finish-6),WEEKDAY
    (Finish)=6),1,0)

    seems to work!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1