+ Reply to Thread
Results 1 to 4 of 4

Calculating Difference Between Two Dates (over multiple years via months)!

  1. #1
    Registered User
    Join Date
    01-28-2019
    Location
    Atlanta, Georgia
    MS-Off Ver
    MS Office 2016
    Posts
    1

    Talking Calculating Difference Between Two Dates (over multiple years via months)!

    Hello All,

    I recently had a job interview where I was given a scenario (see attachment) and asked to explain how I would go about solving it.

    While not actually having to solve it, I was able to get a copy of the solved spreadsheet and am looking for guidance on alternative ways of solving this rather than the long chain of nested IF (left, right) statements.

    This is a date-related question where in columns E&P I am supposed to determine how many months of each calendar year a particular car model is scheduled to be onsale for.

    The question is solved but I'm looking for help on alternative ways...any assistance is helpful

    Thank you!
    Last edited by andyberger87; 01-29-2019 at 03:43 PM.

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Calculating Difference Between Two Dates (over multiple years via months)!

    won't let me post

  3. #3
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Calculating Difference Between Two Dates (over multiple years via months)!

    Usually I would create a helper column to extract the year and months first, but since your "puzzle" didn't specific the rule, I am guessing it is a formula only puzzle. For some reason the forum won't let me post the formula. See the attached file.
    Attached Files Attached Files

  4. #4
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Calculating Difference Between Two Dates (over multiple years via months)!

    Please try at E3 drag across and down

    =IFERROR(DATEDIF(MAX(DATE(RIGHT($C3,2)+2000,LEFT($C3,2),1),("1/1/"&E$2)),MIN(DATE(RIGHT($D3,2)+2000,LEFT($D3,2),1),("1/1/"&E$2+1)-1),"m")+1,0)

+ 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] Looking for alternative to large "nested if" statement
    By the_boo in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-16-2017, 07:29 AM
  2. Alternative to Nested IF Statement
    By s1crock in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-16-2014, 06:13 PM
  3. Need Alternative to very long nested if statement
    By Jay Stolzenberg in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-06-2013, 06:39 PM
  4. [SOLVED] Alternative to Nested IF Statement
    By ahs004 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-02-2013, 07:58 AM
  5. [SOLVED] Help needed with competion matrix and nested IF statement
    By skyping in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-16-2012, 08:09 AM
  6. Nested IF Statement Alternative
    By Gecks in forum Excel General
    Replies: 4
    Last Post: 02-07-2012, 02:40 PM
  7. [SOLVED] Date related IF statement
    By Miss Candace in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-28-2005, 03:06 PM

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