+ Reply to Thread
Results 1 to 6 of 6

Formula not blanking dates after month end

  1. #1
    Valued Forum Contributor
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    1,402

    Formula not blanking dates after month end

    Attached sample has a formula "dragged" across row 3:

    IF(C3+1=">"&EOMONTH($B$1,0),"",C3+1)

    If adding a day to the date in C3 takes it past the last day of the month in B1, cell to be blank. Otherwise add a day to the C3 date.

    As shown on the attached, however, it isn't working. L3 and M3 should be blank, but are showing the 1st and 2nd of May.

    Any ideas, pointers or solutions welcomed as ever.

    Ochimus
    Attached Files Attached Files

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Formula not blanking dates after month end

    Hi Ochimus,

    Try this in L3 and pull right
    Please Login or Register  to view this content.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,657

    Re: Formula not blanking dates after month end

    B3:
    Please Login or Register  to view this content.
    Last edited by protonLeah; 11-30-2017 at 02:19 PM.
    Ben Van Johnson

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,457

    Re: Formula not blanking dates after month end

    The construct in your formula is wrong ..

    IF(K3+1=">"&EOMONTH($B$1,0),"",K3+1)

    should be

    IF(K3+1>EOMONTH($B$1,0),"",K3+1)

    Marvin's addition of the IFERROR resolves the problem that would occur in M3 when you try to add to L3 which is blank (null).

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

    Re: Formula not blanking dates after month end

    Or try this in C3:

    =IF(B3="","",IF(B3+1>EOMONTH($B$1,0),"",B3+1))

  6. #6
    Valued Forum Contributor
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    1,402

    Re: Formula not blanking dates after month end

    First, apologies to each of you who took the time to reply. Should have acknowledged your help before now. Just that sometimes RL gets in the way!

    Having found the answer with your help, can now mark this as "solved"

    Ochimus

+ 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] Calculation of days per month for dates beginning in one month and ending in another month
    By Fahrettin in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-07-2015, 04:52 PM
  2. Replies: 6
    Last Post: 11-26-2014, 10:30 AM
  3. Want formula to return average days between two dates in a given month
    By Abid123 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-13-2014, 08:31 PM
  4. Date Formula for days of the month, new dates starting on the 2nd of the month.
    By Kenn Jerger in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-04-2013, 01:31 AM
  5. [SOLVED] using formula to change date a month on and saving dates
    By cfinch100 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-02-2013, 05:02 PM
  6. [SOLVED] Formula to calculate consecutive end of month dates
    By sunirone in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-11-2013, 12:54 PM
  7. Replies: 4
    Last Post: 02-27-2012, 07:52 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