+ Reply to Thread
Results 1 to 6 of 6

Formula or macro to generate a date of last weeks Friday

  1. #1
    Forum Contributor
    Join Date
    01-29-2011
    Location
    Bristol, England
    MS-Off Ver
    Excel 2003
    Posts
    471

    Formula or macro to generate a date of last weeks Friday

    I need a formula or macro or something that generates a specific date to cell A1 using the TODAY date I would imagine. Im not even sure if it can be done.

    I always need to use the last weeks Fridays date. So it would be nice to have excel figuring it out automatically.

    So lets say today is Saturday the 30th, it would then generate 29/01/2011 to A1.
    If today would be Thursday the 03/02/2011 it would still put 29/01/2011 to A1.
    If today would be Friday the 04/02/2011 it would still put 29/01/2011 to A1.
    But if today would be Wednesday the 09/02/2011 it would now put 04/02/2011 to A1.

    So it would always put last week Fridays date to A1 (even if today is Friday, still it should be last weeks friday)

    Would be extremely grateful if someone could help me out.
    Cheers
    Rain
    Last edited by rain4u; 01-29-2011 at 10:12 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Formula or macro to generate a date of last weeks Friday

    You could try:

    Please Login or Register  to view this content.

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,028

    Re: Formula or macro to generate a date of last weeks Friday

    Am I wrong or today is 29, and last friday is (yesterday) 28th?

    Use this:

    =A1-WEEKDAY(A1+2, 2)

    where in A1 is TODAY date (or you can put it in formula)
    Never use Merged Cells in Excel

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Formula or macro to generate a date of last weeks Friday

    Quote Originally Posted by rain4u
    even if today is Friday, still it should be last weeks friday
    In respect of the above my suggestion should be disregarded. I confess I didn't read the question thoroughly.

  5. #5
    Forum Contributor
    Join Date
    01-29-2011
    Location
    Bristol, England
    MS-Off Ver
    Excel 2003
    Posts
    471

    Re: Formula or macro to generate a date of last weeks Friday

    Quote Originally Posted by DonkeyOte View Post
    You could try:

    Please Login or Register  to view this content.
    It works with to exception. If todays date happens to be a Friday, it still picks up this weeks Friday date not the date for last week. I.e. if today would be 04/02/2011 which is friday, it populates 04/02/2011 to A1.

    But still many thanks anyway.
    Quote Originally Posted by zbor View Post
    Am I wrong or today is 29, and last friday is (yesterday) 28th?

    Use this:

    =A1-WEEKDAY(A1+2, 2)

    where in A1 is TODAY date (or you can put it in formula)
    Thanks buddy. This works as required. You are a star!!!!!!


    Cheers

  6. #6
    Forum Contributor
    Join Date
    01-29-2011
    Location
    Bristol, England
    MS-Off Ver
    Excel 2003
    Posts
    471

    Re: Formula or macro to generate a date of last weeks Friday

    Quote Originally Posted by DonkeyOte View Post
    In respect of the above my suggestion should be disregarded. I confess I didn't read the question thoroughly.
    Lol. Was just replying to you. But seriously man, thanks for the input!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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