+ Reply to Thread
Results 1 to 14 of 14

Date Calculation

  1. #1
    Registered User
    Join Date
    08-04-2009
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    13

    Cool Date Calculation

    Dear All,

    Please help me to calculate difference between two dates.

    Ex:
    Start date End date 2011 2012
    25/01/2011 30/02/2012 XXXX XXXX

    1. Start date is 25/10/2011 and end date is 30/02/2012 in the 2011 column i need formula ( from start date to end of that year duration of months need to calculate)
    Answer: 11 months

    2. In 2012 Column it should calculate from 01st jan of the 2012 and end date is 30/02/2012. i need formula ( from start date to end date duration of months need to calculate)
    Answer : 2 months
    Note: if end date is before 31/12/2011 2012 column should be “00”.
    Regards
    Suresh G

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Date Calculation

    Post a Sample WORKBOOK.
    Nobody wants to type data from a picture or paste text from your post into a spreadsheet as a prelude to helping. To attach a file, push the button with the paperclip (or scroll down to the Manage Attachments button), browse to the required file, and then push the Upload button.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    08-04-2009
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Date Calculation

    Please find the attachment
    Attached Files Attached Files
    Last edited by SURESH G; 03-06-2012 at 08:22 AM.

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Date Calculation

    Read through this article. You should be able to adapt it to your needs -

    http://office.microsoft.com/en-us/ex..._months_betwee
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Date Calculation

    Your attachment doesnt reflect anything regarding the post. Please check and upload again.

  6. #6
    Registered User
    Join Date
    08-04-2009
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Date Calculation

    Sorry mistakenly i uploaded another one. now i uploaded correct one. Please find

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Date Calculation

    Check post 4. If you still face issues, then revert with what issues you are facing.

  8. #8
    Registered User
    Join Date
    08-04-2009
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Date Calculation

    I have uploaded the excel with exatly what i require. expecting answers also given in column C, D, E and F. Please provide formula in the C, D, E and F columns.
    Attached Files Attached Files

  9. #9
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Date Calculation

    Did you try the formulae in the link i gave you? What issues are you facing?

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

    Re: Date Calculation

    Not sure about how you are counting partial months - this approach roughly rounds to the nearest month

    Change the value in C1:E1 to show year number only like 2010, 2011 and 2012 then try this formula in C2 copied across to E2 and down

    =IFERROR(DATEDIF(MAX(DATE(C$1,1,0),$A2-15),MIN(DATE(C$1+1,1,1),$B2),"m"),0)
    Audere est facere

  11. #11
    Registered User
    Join Date
    08-04-2009
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Date Calculation

    Really i can't able to utilize your which you send the link.

    If you don't mind can you write formular in C, D, E and F column and give me pls.

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

    Re: Date Calculation

    I revised my suggested formula slightly to take into account the rows where you have blanks, this is the new version

    =IFERROR(DATEDIF(MAX(DATE(C$1,1,0),$A2-15),MIN(DATE(C$1+1,1,1),$B2),"m"),0)

    see attached
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    08-04-2009
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Date Calculation

    Thank your very much Daddylonglegs. Almost it is matching, my criteria is if the month is more than 15 days should be count as 1 month. Please do the needful.

  14. #14
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Date Calculation

    have you considered having a go yourself at adapting the formula

+ 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