+ Reply to Thread
Results 1 to 15 of 15

Formula to get date for every FRIDAY for the year

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Formula to get date for every FRIDAY for the year

    Hello:


    Say Cell A1=2020

    I need formula in cell A5 down to give dates of Evry FRIDAY
    and 1st date of the month

    In Attached file, i have shown the sequence

    Please let me know if you have any questions.
    Thanks.

    Riz
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,432

    Re: Formula to get date for every FRIDAY for the year

    Please attach an .xlsx file, not .xlsb. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Formula to get date for every FRIDAY for the year

    Hello:

    Attached is .xlsx file

    Please let me know if you have any questions.
    Thanks.

    Riz
    Attached Files Attached Files

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,432

    Re: Formula to get date for every FRIDAY for the year

    Try this in A6 copied down:

    =MIN(EOMONTH(A5,0)+1,WORKDAY.INTL(A5,1,"1111011"))

    You could use this in A5:

    =DATE(A1,1,1)
    Attached Files Attached Files
    Last edited by AliGW; 06-27-2020 at 02:11 PM.

  5. #5
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Formula to get date for every FRIDAY for the year

    Deleted (can't post the solution)
    Last edited by oeldere; 06-27-2020 at 02:54 PM.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,696

    Re: Formula to get date for every FRIDAY for the year

    Quote Originally Posted by oeldere View Post
    Deleted (can't post the solution)
    We have a rather aggressive filter for HTML injection, and it often rejects benign formulas that contain a < or > sign. There are a couple of workarounds.

    • Include a space after the < sign. My post was accepted just as you see it here.
    • Highlight the < sign and then use the color button to color it black. It will still look the same but the filter will see the color codes around it and accept it.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  7. #7
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Formula to get date for every FRIDAY for the year

    e5 = 01-01-2020

    e6 =E5+5-(WEEKDAY(E5,2)) since 5 is Friday

    e7 =IF(MONTH(E6) < MONTH(E6+7),EOMONTH(E6,0)+1,IF(EOMONTH(E5,0)+1=(E5+7),E5+14,IF(MONTH(E6)=MONTH(E5),E6+7,E5+7))) and drag down.


    Where do you this kind of structor for?
    Can you explain that to me.

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,432

    Re: Formula to get date for every FRIDAY for the year

    Why three formulae when it can be done with just two (see my solution above)?

  9. #9
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Formula to get date for every FRIDAY for the year

    @AliGW,

    1 formula is not always better, since it could be hard to read.

    In this case your solution is a lot easier than mine.

    Since I had made the formula, I feel the need to post.

    Great job, Ali.
    Last edited by oeldere; 06-28-2020 at 01:50 AM. Reason: alway changed in always

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

    Re: Formula to get date for every FRIDAY for the year

    @Ali, Very clever formula
    A small adjustment from Ali's formula to 1 formula at A5

    =IF(A4,MIN(EOMONTH(A4,0)+1,WORKDAY.INTL(A4,1,"1111011")),DATE($A$1,1,1))

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,432

    Re: Formula to get date for every FRIDAY for the year

    Some nice options there, chaps.

    Wonder what Riz will go for?

  12. #12
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,408

    Re: Formula to get date for every FRIDAY for the year

    @Bo_Ry,

    I like Ali's solution as she wrote it instead. You know only one cell will meet the FALSE part of your IF statement, and you know which cell it is, so why burden every cell that follows it with the extra IF function call when they can only meet the TRUE part of that IF function call?
    Last edited by Rick Rothstein; 06-27-2020 at 04:48 PM.

  13. #13
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Formula to get date for every FRIDAY for the year

    Hello All;
    Great solution by Ali.
    Superb...

    Thanks to all.

    Riz

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,432

    Re: Formula to get date for every FRIDAY for the year

    Thanks, Riz, and glad to help.

  15. #15
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Formula to get date for every FRIDAY for the year

    Thanks for the rep.

    Glad I could help.

    Thanks for marking the question solved.

+ 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. Formula to identify month that runs From Last Friday to Last Friday
    By Mr Stern 2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-25-2019, 06:23 AM
  2. [SOLVED] Plotting the date of first Friday by formula for the given year and month.
    By thilag in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-22-2014, 08:35 AM
  3. Replies: 9
    Last Post: 12-19-2012, 01:06 AM
  4. [SOLVED] Formula to automatically figure out the first friday of a specified month and year
    By darchaf in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-28-2012, 07:57 PM
  5. Replies: 3
    Last Post: 08-14-2012, 05:14 AM
  6. List First Friday's Date of the year
    By seanrigby in forum Excel General
    Replies: 2
    Last Post: 05-08-2006, 02:33 PM
  7. Replies: 1
    Last Post: 04-10-2006, 02:50 PM

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