+ Reply to Thread
Results 1 to 4 of 4

Find last day month in a week.

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    05-16-2012
    Location
    Latina, ITALY
    MS-Off Ver
    Excel 2010--2016
    Posts
    947

    Find last day month in a week.

    Good evening with the formula:

    =DATE($A$1,1,1)+A3*7-1
    I find in column D the date of the last day of the week number
    of column B.
    Now I would need that when you cross the month the date will stop
    at the last day of that month.
    As seen in the prospect the week N.5 ends on 04/02/2018 I would like
    to have the date 31/01/2018 ....
    the N. week 18 ends the 06/05/2018 would like to have 30/04/2018
    Thank you

    A
    B
    C
    D
    E
    F
    1
    2018
    2
    Num Week date last day week
    last day month
    3
    5
    04/02/2018
    31/01/2018
    4
    9
    04/03/2018
    28/02/2018
    5
    13
    01/04/2018
    31/03/2018
    6
    18
    06/05/2018
    30/04/2018
    7
    8

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

    Re: Find last day month in a week.

    Given a date in D3

    =EOMONTH(D3,-1)

    will provide the last date of the previous month
    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 Contributor
    Join Date
    05-16-2012
    Location
    Latina, ITALY
    MS-Off Ver
    Excel 2010--2016
    Posts
    947

    Re: Find last day month in a week.

    Thanks Special-K
    but maybe I did not explain myself well.
    During the month it's okay to give me the weekend day.
    Only when going from one month to another would I have
    the last day of the month current not of the week.

    Example if I put N. week 23 is right to report
    weekend 10/06/2018
    while with your formula gives me 31/05/2018
    I hope it's clear now.

  4. #4
    Forum Contributor
    Join Date
    05-16-2012
    Location
    Latina, ITALY
    MS-Off Ver
    Excel 2010--2016
    Posts
    947

    Re: Find last day month in a week.

    I solved by putting in column C
    the first day of the week

    =DATE($A$1,1,1)+A3*7-7
    and in column E:

    =IF(MONTH(C3)=MONTH(D3),D3,EOMONTH(C3,0))
    A
    B
    C
    D
    E
    F
    1
    2018
    2
    Num Week date first day week date last day week
    last day month
    3
    5
    29/01/2018
    04/02/2018
    31/01/2018
    4
    9
    26/02/2018
    04/03/2018
    28/02/2018
    5
    13
    26/03/2018
    01/04/2018
    31/03/2018
    6
    18
    30/04/2018
    06/05/2018
    30/04/2018
    7

+ 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. Find out last week, last month, last quarter from todays date
    By meus in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-16-2015, 01:33 AM
  2. [SOLVED] Formula to find the week and month from a date
    By arun.sj in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-01-2014, 05:11 AM
  3. [SOLVED] Need to find week number in a month
    By asar_k in forum Excel General
    Replies: 4
    Last Post: 07-03-2012, 07:39 AM
  4. Replies: 10
    Last Post: 01-22-2012, 10:05 AM
  5. Formula to find week no. in a fiscal month
    By sqledge in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 11-12-2010, 06:56 PM
  6. Replies: 3
    Last Post: 07-17-2010, 12:56 PM
  7. vba to find the month and week number from given date
    By Anil2007 in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 04-27-2009, 07:43 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