+ Reply to Thread
Results 1 to 8 of 8

Need Help with date calculation

  1. #1
    Registered User
    Join Date
    07-21-2015
    Location
    Boston
    MS-Off Ver
    2010
    Posts
    1

    Need Help with date calculation

    A1=11/05/2009 Start Date
    A2=36 No of Months
    A3= 11/30/12 Answer

    A1=11/13/2009 Start Date
    A2=36 No of Months
    A3= 12/31/12 Answer


    I need to have a formula so that in cell A3 is calculated on the basis, if the A1 is equalto or less than 10 then the answer is rounded to the end of the same month after adding number of months. Now if A1 is greater than or equal to 11 then answer is calculated to the end of next month after adding the number of months from A2. Thanks for the help.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Need Help with date calculation

    Try

    =IF(DAY(A1)<=10,EOMONTH(A1,A2),EOMONTH(A1,A2+1))
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    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,215

    Re: Need Help with date calculation

    In A1 do mean day <= 10?

  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,215

    Re: Need Help with date calculation

    ...Answered by ChemistB.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Need Help with date calculation

    Hi, welcome to the forum

    Based on your sample data, put his in A3,...
    =EOMONTH(EDATE(A1,A2),IF(DAY(A1)<11,0,1))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Need Help with date calculation

    Nice 1 ChemistB

    Can be shortened to...
    =EOMONTH(A1,A2+IF(DAY(A1)<=10,0,1))

  7. #7
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Need Help with date calculation

    Yeah, I think too linearly sometimes. Nice improvement, Ford

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Need Help with date calculation

    ....Thanks

+ 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. Long date/short date conversion and cycle time calculation
    By COGICPENNY in forum Excel General
    Replies: 1
    Last Post: 02-14-2014, 05:17 PM
  2. [SOLVED] If Statement with today's date minus due date for a delay calculation
    By RDFUC in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-26-2013, 02:58 PM
  3. [SOLVED] Need Calculation - If A1=Annual, Anniv. Date for Current Year, else Biennial Date
    By TaxAnnihilator in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-11-2013, 06:06 PM
  4. Replies: 4
    Last Post: 06-02-2012, 11:26 AM
  5. Replies: 1
    Last Post: 04-18-2012, 05:49 PM
  6. Replies: 6
    Last Post: 08-10-2006, 11:30 PM
  7. [SOLVED] subtract a delivery date:Date Calculation to exclude weekends
    By Vim in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-24-2006, 11:00 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