+ Reply to Thread
Results 1 to 7 of 7

Cell displays last date of next month.

  1. #1
    Registered User
    Join Date
    02-19-2007
    Posts
    30

    Question Cell displays last date of next month.

    Hi everyone,

    I have entered =TODAY() in Cell C21 and i need the date in E46 to display the last day of next month.

    Is there a way of making this do this automatically?

    Cheers Mark

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,596

    Re: Cell displays last date of next month.

    This will display last date of next month:

    =DATE(YEAR(C21)+INT((MONTH(C21)+1)/MONTH(C21));MONTH(C21)+1; )

    This will display last day as number:

    =WEEKDAY(DATE(YEAR(C21)+INT((MONTH(C21)+1)/MONTH(C21));MONTH(C21)+1; );2)

    If you format cell as dddd you'll get text (monday, tuesday...)

    Replace ; with , if needed
    Last edited by zbor; 12-10-2009 at 07:51 AM.

  3. #3
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile Re: Cell displays last date of next month.

    Quote Originally Posted by markswan20 View Post
    I have entered =TODAY() in Cell C21 and i need the date in E46 to display the last day of next month.
    How about :

    =DATE(YEAR(C21),MONTH(C21)+1+1,0)

    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  4. #4
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Cell displays last date of next month.

    Try

    E46 =DATE(YEAR(TODAY()),MONTH(TODAY())+2,0)

    hth

  5. #5
    Registered User
    Join Date
    02-19-2007
    Posts
    30

    Re: Cell displays last date of next month.

    Thanks for all your fast responses you all make it look easy :-)

    Thank You

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,596

    Re: Cell displays last date of next month.

    It won't work for DECEMBER That's why I had to complicate my formula

  7. #7
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Cell displays last date of next month.

    Quote Originally Posted by zbor View Post
    It won't work for DECEMBER
    Which one?

    This formula works fine

    =DATE(YEAR(TODAY()),MONTH(TODAY())+2,0)

    gives me 31st Jan 2010 as expected......

    Edit: if you have Excel 2007 or don't mind using Analysis ToolPak functions in earlier versions you can use EOMONTH function, i.e.

    =EOMONTH(C21,1)
    Last edited by daddylonglegs; 12-10-2009 at 08:19 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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