+ Reply to Thread
Results 1 to 4 of 4

Need to return the following January or July

  1. #1
    Registered User
    Join Date
    11-28-2017
    Location
    San Diego, CA
    MS-Off Ver
    2013
    Posts
    10

    Need to return the following January or July

    I need a formula please to return the following January 1st or July 1st after a given date.

    Example:
    If date is 8/28/2019, then return 1/1/2020.
    If date is 2/1/2020, then return 7/1/2020.

    Thank you!

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,705

    Re: Need to return the following January or July

    Assuming your date is in A1, you can do this:

    =EOMONTH(A1,MOD(12-MONTH(A1),6))+1

    Format as a date in the style you prefer, then copy down as required.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    11-28-2017
    Location
    San Diego, CA
    MS-Off Ver
    2013
    Posts
    10

    Re: Need to return the following January or July

    That works awesome! On follow-up question...

    I would now like to also show the following 6/30.

    Examples:
    1/1/2020, then show 6/30/2020
    8/7/2019, then show 6/30/2020

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,705

    Re: Need to return the following January or July

    If you want to show the next 30th June from the date in A1, you can use this in B1:

    =DATE(YEAR(A1)+(MONTH(A1)>6),6,30)

    Again, format as a date, then copy down.

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark the thread as SOLVED.

    Also, since you are relatively new to the forum, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Hope this helps.

    Pete

+ 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. [SOLVED] Change From 1 January 2015 Thursday to 1 January 2015 Thu
    By HerryMarkowitz in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-14-2015, 11:47 AM
  2. [SOLVED] How old my students on 01 july 2014
    By Jhon Mustofa in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-20-2014, 03:49 PM
  3. [SOLVED] VBA Filter for January
    By Jiptastic in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-04-2014, 04:05 PM
  4. july competition
    By martindwilson in forum The Water Cooler
    Replies: 7
    Last Post: 08-27-2012, 01:57 PM
  5. january 1 birthdays
    By martindwilson in forum The Water Cooler
    Replies: 24
    Last Post: 12-03-2010, 12:02 PM
  6. Return day of week for 1 January
    By dalymjl in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-23-2006, 08:40 PM
  7. January 2006
    By Howard in forum Excel General
    Replies: 12
    Last Post: 01-04-2006, 12:25 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