+ Reply to Thread
Results 1 to 5 of 5

Day of month is 20th or later then output 1st day of next month

  1. #1
    Registered User
    Join Date
    07-21-2021
    Location
    San francisco
    MS-Off Ver
    2020
    Posts
    9

    Day of month is 20th or later then output 1st day of next month

    I have a list of dates in XX/XX/XXXX format and I am looking for a formula to output a new date as the first day of the NEXT month if the day of the current month is on the 20th or later. Then if the day of the month is before the 20th to output a date that is on the first of the current month. Any help is greatly appreciated.


    3/16/2015 should be 3/1/2015
    5/20/2012 should be 6/1/2012
    Last edited by billybbeenn8; 07-21-2021 at 06:35 PM.

  2. #2
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,410

    Re: Day of month is 20th or later then output 1st day of next month

    Here is one way to do it...

    =IF(DAY(A2)<20,A2-DAY(A2)+1,A2+13-DAY(A2+12))

  3. #3
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,410

    Re: Day of month is 20th or later then output 1st day of next month

    And here is a shorter formula that will also work...

    =EOMONTH(A1-DAY(A1),0+(DAY(A1)>19))+1

  4. #4
    Registered User
    Join Date
    07-21-2021
    Location
    San francisco
    MS-Off Ver
    2020
    Posts
    9

    Re: Day of month is 20th or later then output 1st day of next month

    Thanks so much!

  5. #5
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,908

    Re: Day of month is 20th or later then output 1st day of next month

    A little shorter:

    =EOMONTH(A1,-(DAY(A1)<20))+1

+ 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. Formula to calculate the average of 1st-10th, 11-20th and 21-end of month
    By layles1 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-04-2019, 12:33 AM
  2. [SOLVED] Return the tuesday before the 20th of a month before an effective date
    By Alphabex in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-19-2018, 03:47 PM
  3. [SOLVED] Formula to get weekday closest to 20th of the month
    By rizmomin in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-20-2018, 06:32 PM
  4. [SOLVED] Formula to get 15th and 20th of the month if weekdays
    By rizmomin in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 10-13-2017, 02:53 PM
  5. [SOLVED] Need date to be 20th of month or nearest Friday if 20th is weekend
    By Ochimus in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-02-2016, 03:37 AM
  6. [SOLVED] Problem With Find And Replace With The 20th Of The Month
    By Macro Fool in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-13-2014, 11:01 AM
  7. Replies: 3
    Last Post: 01-15-2011, 10:16 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