+ Reply to Thread
Results 1 to 9 of 9

Count how many Fridays based on the current day of the month

  1. #1
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    2010
    Posts
    496

    Count how many Fridays based on the current day of the month

    Hi,
    I need help on "Count how many Fridays based on the current day of the month"

    The count is based on the current day. If the October calendar, there is two Friday
    in two weeks, Oct. 5 and Oct 12. Since Oct 10 is in the same week as Oct 12, so
    I count as one week. Then I use no. of weeks to multiple $value.

    This formula will good for any month and any year on pending on today's date.

    Maybe use week number to find out? 41-40+1 = 2 weeks. Not sure it is right for other months and years
    that first week or last week of the month has Friday.


    Thanks
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by Rocky2013; 10-10-2018 at 11:33 PM.

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,078

    Re: Count how many Fridays based on the current day of the month

    "If the October calendar, there is two Friday in two weeks, Oct. 4 and Oct 12"

    According to your calendar October 4th is a THURSDAY not Friday.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Count how many Fridays based on the current day of the month

    Please type A24 = today()
    F24
    =NETWORKDAYS.INTL(EOMONTH(A24,-1)+1,A24-WEEKDAY(A24)+7,"1111011")

    Then change A24 to other date to check.

  4. #4
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    2010
    Posts
    496

    Re: Count how many Fridays based on the current day of the month

    Quote Originally Posted by Special-K View Post
    "If the October calendar, there is two Friday in two weeks, Oct. 4 and Oct 12"

    According to your calendar October 4th is a THURSDAY not Friday.
    Typo, Oct 4 should be Oct 5 which is Friday

  5. #5
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    2010
    Posts
    496

    Re: Count how many Fridays based on the current day of the month

    Quote Originally Posted by Bo_Ry View Post
    Please type A24 = today()
    F24
    =NETWORKDAYS.INTL(EOMONTH(A24,-1)+1,A24-WEEKDAY(A24)+7,"1111011")

    Then change A24 to other date to check.

    It works. I make a mistake on my request after I play around with your formula.

    If the customers' payment is due weekly between Monday to Friday in that week,
    Saturday and Sunday should be the same week as Monday to Friday.

    I should set Monday is the first day of the week, and Sunday is the last day of the week not first
    day of following week.

    Example: If I have a date of Oct. 14 Sunday, the current formula give 3 Fridays. I want to change
    to 2 Fridays to make Sunday is the last day of the week.

    Thanks

  6. #6
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Count how many Fridays based on the current day of the month

    Try this

    =NETWORKDAYS.INTL(EOMONTH(A24,-1)+1,A24,"1111011")

    I'm not clear on how you count, please give answer on date form Oct below which date give 2 weeks and which data give 3 weeks.

    14 15 16 17 18 19 20

  7. #7
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    2010
    Posts
    496

    Re: Count how many Fridays based on the current day of the month

    Hi,
    Your formula gives 1 week when the date is Oct. 10. I need the week for Oct 10 to be 2
    because Oct. 10 is within Oct. 8 - Oct 14.

    I add the week below the date; I also add Oct. 21 Sunday to show it belongs to 3th week. Thanks

    14 15 16 17 18 19 20 21
    2 3 3 3 3 3 3 3

  8. #8
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Count how many Fridays based on the current day of the month

    Ok this should work

    =NETWORKDAYS.INTL(EOMONTH(A24,-1)+1,A24-WEEKDAY(A24,2)+7,"1111011")

  9. #9
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    2010
    Posts
    496

    Re: Count how many Fridays based on the current day of the month

    Hi,
    Indeed it does work what I want. Thanks a lot!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Determine work days in current month or next month based on day of the month
    By sbrnard in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 05-29-2014, 05:14 PM
  2. Count the Number of Fridays in a Month
    By robert_shindorf in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-08-2014, 10:37 AM
  3. [SOLVED] Pick a cell containing current month actulas based what the current month is.
    By vanbasten007 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-10-2014, 01:17 AM
  4. VBA: Piviot table Month auto select based on current month?
    By mattress58 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-24-2013, 08:45 AM
  5. VBA: Piviot table Month auto select based on current month?
    By mattress58 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-21-2013, 07:18 AM
  6. [SOLVED] Help with a system to auto populate month names based on current month
    By rosboy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-01-2012, 05:17 PM
  7. [SOLVED] VBA to identify the current month and previous month based on system date
    By ravikumar00008 in forum Excel General
    Replies: 10
    Last Post: 07-26-2012, 10:04 AM

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