+ Reply to Thread
Results 1 to 7 of 7

Return the last day of a given month

  1. #1
    Registered User
    Join Date
    12-17-2013
    Location
    Greater NYC Area
    MS-Off Ver
    Excel 2010
    Posts
    84

    Return the last day of a given month

    Hello all,

    I'm sure there is a nice easy solution to this problem, but for whatever reason I've got a Monday brain and can't come up with a proper solution!

    So I have a table with three columns. The first is the year of the item and the second is the given month. I need to fill in the third column with the date of mm/<last day of given month>/yy

    I can't figure out a way to have Excel return the last day of the given month in a formula.

    See attached for a quick demo of what I'm looking at.

    Thank you very much in advance for your help!
    Attached Files Attached Files
    Last edited by IronCladRooster; 07-27-2015 at 12:24 PM. Reason: Attachment issues

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

    Re: Return the last day of a given month

    Try

    =TEXT(EOMONTH(DATE(B3,C3,1),0),"ddd")
    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
    Registered User
    Join Date
    12-17-2013
    Location
    Greater NYC Area
    MS-Off Ver
    Excel 2010
    Posts
    84

    Re: Return the last day of a given month

    Works great! Just had to swap out "dd" for "ddd" so I got a number instead of a "sat" or "sun" or whatever.

    Thank you for your help!

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

    Re: Return the last day of a given month

    It looks like you want the date, rather than th ename of the day, of the last day of tjh emonth. In which case - try this slight modification:

    =TEXT(EOMONTH(DATE(B3,C3,1),0),"dd")
    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

  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 2406
    Posts
    44,662

    Re: Return the last day of a given month

    As for the second part of your query - try this:

    =TEXT(EOMONTH(DATE(I14,MONTH(DATEVALUE(J14&" 1")),1),0),"dd")

  6. #6
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,652

    Re: Return the last day of a given month

    i can't figure out a way to have excel return the last day of the given month in a formula.
    Please Login or Register  to view this content.
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  7. #7
    Registered User
    Join Date
    12-17-2013
    Location
    Greater NYC Area
    MS-Off Ver
    Excel 2010
    Posts
    84

    Re: Return the last day of a given month

    Quote Originally Posted by popipipo View Post
    Please Login or Register  to view this content.
    Genius! Thank you!

+ 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. Return First and Last Month with Data in By-Month Table
    By xtinct2 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-27-2015, 01:16 PM
  2. [SOLVED] Formula to return End OF Month date with non-calendar month lengths.
    By Snoddas in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 05-09-2014, 08:45 AM
  3. Return value of the last week of the month based on the year and month
    By stevekho2 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-14-2013, 11:04 AM
  4. Return month even if first sunday is in previous month?
    By jordiejones in forum Excel General
    Replies: 2
    Last Post: 03-22-2011, 07:54 PM
  5. Type in Month-Year and return 3rd wednesday of month
    By learntheweek in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-09-2010, 11:29 AM
  6. Replies: 3
    Last Post: 09-25-2007, 10:26 AM
  7. Formula to return last day of month for each month in year?
    By StargateFan in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-03-2006, 12:10 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