+ Reply to Thread
Results 1 to 2 of 2

Problem with calculation in a time duration formula

  1. #1
    Registered User
    Join Date
    01-21-2015
    Location
    Virginia
    MS-Off Ver
    MS Office Professional Plus 2013
    Posts
    1

    Problem with calculation in a time duration formula

    Hi group,

    I joined Excel forum because I hope someone can help me with this tricky formula. I'm trying to calculate the duration of time (years) where start and stop years can be formatted "2012" "FA12" or "SP12". You may have guessed that this is to calculate when a person started and ended an education program. From left to right, there is a column for START, a column for END, and a column for "CTIP" (Current time in program). The formula in the CTIP cell is

    =IFERROR([@[Years To Graduate]],(IF(LEFT([@[Start Sem]],2)=LEFT([@[Current Sem]],2),((RIGHT([@[Current Sem]],2)-(RIGHT(RC[-6],2)))),(RIGHT([@[Current Sem]],2)-(RIGHT(RC[-6],2)+0.5)))))

    If the start date is FA12, we get the correct answer in CTIP. If the start date is SP12, the CTIP reports an entire year too soon (e.g., it reads 1 for SP12 to FA13 when it should be 2).

    Any help is appreciated!

  2. #2
    Registered User
    Join Date
    05-13-2013
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Problem with calculation in a time duration formula

    I think this is what you are looking for...

    I'm not entirely sure I undertand which cells exactly are being referenced where, so use the below formula and just select <End Date> in the formula bar in Excel and then click on which cell represents the end date, and likewise for <Start Date>.

    =IFERROR([@[Years To Graduate]], RIGHT(<End Date>,2)-RIGHT(<Start Date>,2) +0.5 - IF(LEFT(<End Date>,2)="FS",1,0) + IF(LEFT(<Start Date>,2)="FS",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] need help with duration (cumulative time) calculation
    By hgeorges in forum Excel General
    Replies: 4
    Last Post: 07-29-2014, 04:01 PM
  2. [SOLVED] Sumproduct with Time Duration calculation
    By gav0101 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-05-2012, 06:34 PM
  3. Having problem with Duration calculation
    By Dreammy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-23-2010, 01:44 PM
  4. Help with time duration formula..
    By amper in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 12-28-2006, 11:46 AM
  5. [SOLVED] Time duration formula
    By Ska in forum Excel General
    Replies: 2
    Last Post: 02-18-2005, 10:06 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