+ Reply to Thread
Results 1 to 25 of 25

Write Every Friday for the last 55 week, but need to exclude the good friday holiday

  1. #1
    Registered User
    Join Date
    03-25-2014
    Location
    Québec
    MS-Off Ver
    Excel 2016
    Posts
    19

    Write Every Friday for the last 55 week, but need to exclude the good friday holiday

    So Im looking to drag every friday from left to right using the formula workday but I need the formula to ignore the 3/30/2018 (good friday holliday) and change it to the last business day which is the 3/29/2018.

    My formula is =WORKDAY(C2,-5,$A$1) A1 is the holliday date (3/30/2018)

    Everything goes fine untill I come to the holliday, I get the 3/29/2018, which is what I want, but past this point I am getting every thuesday. I can't figure something that past this thuesday I still want to have the fridays.

    Thanks for your time.

    Alex.

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Write Every Friday for the last 55 week, but need to exclude the good friday holiday

    What is the value of cell C2?
    If someone has helped you then please add to their Reputation

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Write Every Friday for the last 55 week, but need to exclude the good friday holiday

    You could try this:

    =WORKDAY(IF(AND(C2<$A$1,C2+7>$A$1),C2+1,C2),-5,$A$1)

    in D2, and dragged across.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Registered User
    Join Date
    03-25-2014
    Location
    Québec
    MS-Off Ver
    Excel 2016
    Posts
    19

    Re: Write Every Friday for the last 55 week, but need to exclude the good friday holiday

    Quote Originally Posted by Glenn Kennedy View Post
    You could try this:

    =WORKDAY(IF(AND(C2<$A$1,C2+7>$A$1),C2+1,C2),-5,$A$1)

    in D2, and dragged across.

    Exactly what I need.

    Thank you very much !
    Last edited by Fortier40; 09-21-2018 at 05:13 PM.

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Write Every Friday for the last 55 week, but need to exclude the good friday holiday

    Did you include the correct quotation?

    Whichever... You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

  6. #6
    Registered User
    Join Date
    03-25-2014
    Location
    Québec
    MS-Off Ver
    Excel 2016
    Posts
    19

    Re: Write Every Friday for the last 55 week, but need to exclude the good friday holiday

    Im looking to enlarge the data range to 4 years, somehow I can't manage to copy/paste the actual formula to add the holidays of the past 4 years.
    Hollidays.

    Hollidays are;

    4,10,2020 ON CELL A1
    4,19,2019 ON CELL B1
    3,30,2018 ON CELL C1
    4,14,2017 ON CELL D1

    C10 is the last friday that is not a holliday.

    Actual Formula is
    =WORKDAY(IF(AND(C10<$A$1,C10+7>$A$1),C10+1,C10),-5,$A$1)


    Thank you very much for your time

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,556

    Re: Write Every Friday for the last 55 week, but need to exclude the good friday holiday

    Try pasting the following into cell D10 and drag across:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  8. #8
    Registered User
    Join Date
    03-25-2014
    Location
    Québec
    MS-Off Ver
    Excel 2016
    Posts
    19

    Re: Write Every Friday for the last 55 week, but need to exclude the good friday holiday

    I think I didnt ask my question correctly and there was some error in the cell referencing. I joined an excel file which I think will explain better my question. Glenn Kennedy had the solution when I first asked for one holliday, now I simply want to add the good fridays of the last 4 years. I think working on the actual formula might be easier.
    Attached Files Attached Files

  9. #9
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,556

    Re: Write Every Friday for the last 55 week, but need to exclude the good friday holiday

    The attached copy of the file shows the formula (post #8) applied beginning with next Friday and extending back through the spring of 2017.
    Let us know if you have any questions.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    03-25-2014
    Location
    Québec
    MS-Off Ver
    Excel 2016
    Posts
    19
    Thank you very much works, like a charm, but past the spring 2017 i dont have values and i need 61 more friday i guess its minor changes, but i cant figure it out. Thank you again
    Last edited by AliGW; 02-02-2020 at 11:23 AM. Reason: Please don't quote unnecessarily!

  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,780

    Re: Write Every Friday for the last 55 week, but need to exclude the good friday holiday

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.
    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.

  12. #12
    Registered User
    Join Date
    03-25-2014
    Location
    Québec
    MS-Off Ver
    Excel 2016
    Posts
    19

    Re: Write Every Friday for the last 55 week, but need to exclude the good friday holiday

    well it's partialy solved, it works but I need to extend the data for 61 more columns

  13. #13
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,556

    Re: Write Every Friday for the last 55 week, but need to exclude the good friday holiday

    Try the following with the file attached to post #9:
    1. Place the date of Good Friday 2016 (3/25/2016) in cell E1
    2. Modify the formula to read:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    3. Drag the formulas in D2:D3 over to column HI
    Note that the formulas ignore Good Friday 2016 in column GW
    Let us know if you have any questions.

  14. #14
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,610

    Re: Write Every Friday for the last 55 week, but need to exclude the good friday holiday

    If you don't have to use WORKDAY, you can try:
    1. Get the next Friday after some date in A1 with:
    Please Login or Register  to view this content.
    1. Calculate previous Fridays and test for good friday with:
    Please Login or Register  to view this content.


    On a new sheet, create a named range of Good Friday dates (column A) with:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Ben Van Johnson

  15. #15
    Registered User
    Join Date
    03-25-2014
    Location
    Québec
    MS-Off Ver
    Excel 2016
    Posts
    19

    Re: Write Every Friday for the last 55 week, but need to exclude the good friday holiday

    Quote Originally Posted by JeteMc View Post
    Try the following with the file attached to post #9:
    1. Place the date of Good Friday 2016 (3/25/2016) in cell E1
    2. Modify the formula to read:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    3. Drag the formulas in D2:D3 over to column HI
    Note that the formulas ignore Good Friday 2016 in column GW
    Let us know if you have any questions.

    Works fine. Thank you alot.

    If I understand, the formula goes in error when we get in a year that does not match cells A1:E1. If thats the case, which it seems it's exactly what I was in need for, i fell like its really easy to manage.

    Again, thank you for your time.

  16. #16
    Registered User
    Join Date
    03-25-2014
    Location
    Québec
    MS-Off Ver
    Excel 2016
    Posts
    19

    Re: Write Every Friday for the last 55 week, but need to exclude the good friday holiday

    Quote Originally Posted by protonLeah View Post
    If you don't have to use WORKDAY, you can try:
    1. Get the next Friday after some date in A1 with:
    Please Login or Register  to view this content.
    1. Calculate previous Fridays and test for good friday with:
    Please Login or Register  to view this content.


    On a new sheet, create a named range of Good Friday dates (column A) with:
    Please Login or Register  to view this content.
    Hi Proton, i'll stick with the aggretate function formula. Somehow, does that formula works well with dragging accross ?

  17. #17
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,556

    Re: Write Every Friday for the last 55 week, but need to exclude the good friday holiday

    As to post #15:
    Yes, the formula will return a #NUM! error if it gets to a year not found in A1:E1.
    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

  18. #18
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Write Every Friday for the last 55 week, but need to exclude the good friday holiday

    Edit
    Please see next post / attachment.
    This one has an error in it. Messes up in mid 4/2019.

    A somewhat different approach.

    Formula is extended back 160 weeks to the first week of 2017. (overkill)

    In D4 this formula filled to column FH:FH.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    That range is named All

    In A7:D7 a helper range that establishes the last Friday of each Holiday month. It is named LastFridays Its formula is
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    In A9 and A10 are some x-check formulas to test my sanity. This one matches the only Thursday in the All range.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    This one counts the Thursdays in the All range. There is only one as planned.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by FlameRetired; 02-04-2020 at 01:24 AM.
    Dave

  19. #19
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Write Every Friday for the last 55 week, but need to exclude the good friday holiday

    The named helper ranges remain the same as previously.

    The new formula in D4 and filled across is
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  20. #20
    Registered User
    Join Date
    03-25-2014
    Location
    Québec
    MS-Off Ver
    Excel 2016
    Posts
    19

    Re: Write Every Friday for the last 55 week, but need to exclude the good friday holiday

    Hello, the formula been working fore more than a year, but somehow I am having difficulties returning the last Fridays since the December 25th 2021 and January 1 2021 hollidays (Both are friday hollidays). Somehow when the formulas continues, it keeps returning the Wednesdays instead of Fridays. I wonder if it's due to the fact to we have two consecutive hollidays or it turns out that the January 1 holliday is buggin the whole thing.

    I joined the excel file.

    Thanks for your time

    Alex.
    Attached Files Attached Files

  21. #21
    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,780

    Re: Write Every Friday for the last 55 week, but need to exclude the good friday holiday

    If you need further help, you might want to remove the solved tag.

    Are you still using Excel 2010? If not, please update your profile. Thanks.

  22. #22
    Registered User
    Join Date
    03-25-2014
    Location
    Québec
    MS-Off Ver
    Excel 2016
    Posts
    19

    Re: Write Every Friday for the last 55 week, but need to exclude the good friday holiday

    Thank you, I updated the thread as unsolved.

    So I did a couple of test, and it seems like the formula start returning Wednesdays when we have two consecutives friday hollidays.

  23. #23
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,556

    Re: Write Every Friday for the last 55 week, but need to exclude the good friday holiday

    The formula in the file attached to post #20 is different from the one proposed in post #7 and used in the file attached to post #9, as it includes a function not recognized by the 2019 version of Excel (displayed as _xlfn.SINGLE).
    The formula from Post #7 will still work to give the dates of Fridays except for Good Friday, given that the dates of Good Friday for the years 2017:2021 are placed in cell A1:D1.
    Has the request has changed to include Christmas Days and New Year's Days that fall on Fridays?
    Let us know if you have any questions.

  24. #24
    Registered User
    Join Date
    03-25-2014
    Location
    Québec
    MS-Off Ver
    Excel 2016
    Posts
    19

    Re: Write Every Friday for the last 55 week, but need to exclude the good friday holiday

    Thank you for the reply.

    I had to modify the formula a little as there was more Friday holiday during that stretch of time. It worked good until the December 25th 2020 and January 1st 2021. Initially the question should have been every holiday that is a Friday where the Stock market is closed = use the before business day. Somehow at that moment i didn't think I would come up with that problem.

    Thanks for your time

    Alex.

  25. #25
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,556

    Re: Write Every Friday for the last 55 week, but need to exclude the good friday holiday

    Try replacing the formula in cell D2 with:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and then copy across.
    Let us know if you have any questions.

+ 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. Friday a week ago and latest quarter
    By needhelp13 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-08-2016, 06:18 PM
  2. [SOLVED] Find Monday & Friday of the last week
    By MariaPap in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-09-2014, 02:59 AM
  3. Formual for monday to friday range for each week
    By ChrisE in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-25-2013, 10:08 PM
  4. Replies: 9
    Last Post: 12-19-2012, 01:06 AM
  5. How to count all dates in column A using last friday and and next friday friday
    By rain4u in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-16-2011, 04:33 PM
  6. weeknum week ending on friday?
    By randalino in forum Excel General
    Replies: 4
    Last Post: 03-19-2009, 10:21 AM
  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