+ Reply to Thread
Results 1 to 16 of 16

Help with conditional time subtraction

  1. #1
    Forum Contributor
    Join Date
    04-18-2011
    Location
    Jeddah
    MS-Off Ver
    Excel 2007
    Posts
    362

    Question Help with conditional time subtraction

    I need a formula please to display a result as follows:

    If time sum of cell L61-98:00 resulted in a time more than 20:00 hours.
    The formula should display please the extra time in hours and minutes over the 20:00 hours multiply by 1.5 plus the original 20:00 hours.
    If cell L61 contains 98:00 hours or less, to display the hours and minutes over 78:00 only.

    Example:
    If Cell L61 has a time of 102:00
    The end result formula should display 26:00

    If Cell L61 has a time of 95:00
    The result should be 17:00

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Help with conditional time subtraction

    Try this...

    =IF(OR(ISTEXT(L61),L61=""),"",IF(L61>98,(L61-98)*1.5+20,20-(98-L61)))


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Contributor
    Join Date
    04-18-2011
    Location
    Jeddah
    MS-Off Ver
    Excel 2007
    Posts
    362

    Re: Help with conditional time subtraction

    Unfortunately the formula given resulted in ########

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Help with conditional time subtraction

    Just format the cell as General

  5. #5
    Forum Contributor
    Join Date
    04-18-2011
    Location
    Jeddah
    MS-Off Ver
    Excel 2007
    Posts
    362

    Re: Help with conditional time subtraction

    I did the formula now display -73.720081

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Help with conditional time subtraction

    Quote Originally Posted by Khaldon View Post
    I did the formula now display -73.720081
    Whether that is what your expected result?

  7. #7
    Forum Contributor
    Join Date
    04-18-2011
    Location
    Jeddah
    MS-Off Ver
    Excel 2007
    Posts
    362

    Re: Help with conditional time subtraction

    The actually time sum I have in my cell L61 is 102:43, I expect to see 27:04

  8. #8
    Forum Contributor
    Join Date
    04-18-2011
    Location
    Jeddah
    MS-Off Ver
    Excel 2007
    Posts
    362

    Re: Help with conditional time subtraction

    102:43-98:00=4:43
    4:43*1.5=7:04
    20+7:04=27:04

  9. #9
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Help with conditional time subtraction

    Try this revised formula...

    =IF(OR(ISTEXT(L61),L61=""),"",IF(VALUE(TEXT(L61,"[h].m"))>98,(VALUE(TEXT(L61,"[h].m"))-98)*1.5+20,20-(98-VALUE(TEXT(L61,"[h].m")))))

  10. #10
    Forum Contributor
    Join Date
    04-18-2011
    Location
    Jeddah
    MS-Off Ver
    Excel 2007
    Posts
    362

    Re: Help with conditional time subtraction

    I am sorry, but the result with the new formula now is #ERR!

  11. #11
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Help with conditional time subtraction

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  12. #12
    Forum Contributor
    Join Date
    04-18-2011
    Location
    Jeddah
    MS-Off Ver
    Excel 2007
    Posts
    362

    Re: Help with conditional time subtraction

    I believe your last formula could be right but it has unsupported function by my apple app I am using to work with my excel sheet.

    Below is a link for the supported functions,
    http://support.dataviz.com/support.srch?docid=2310

    Would you please replace the function in the last formula with a supported one.

    Thank you

  13. #13
    Forum Contributor
    Join Date
    04-18-2011
    Location
    Jeddah
    MS-Off Ver
    Excel 2007
    Posts
    362

    Re: Help with conditional time subtraction

    Attached is a sample of my working sheet as requested before and after.

    Be kindly informed your last formula displayed 638:45 instead of the expected 27:04 in window excel !!
    Attached Files Attached Files
    Last edited by Khaldon; 04-08-2014 at 03:47 PM.

  14. #14
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Help with conditional time subtraction

    Format the formula cell as General

  15. #15
    Forum Contributor
    Join Date
    04-18-2011
    Location
    Jeddah
    MS-Off Ver
    Excel 2007
    Posts
    362

    Re: Help with conditional time subtraction

    I did the formula now returns 26.645 as a number instead of the expected time value of 27:04 !!

  16. #16
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Help with conditional time subtraction

    In K60 Cell-Supporive Cell

    =IF(OR(ISTEXT(L61),L61=""),"",IF(VALUE(TEXT(L61,"[h].m"))>98,(VALUE(TEXT(L61,"[h].m"))-98)*1.5+20,20-(98-VALUE(TEXT(L61,"[h].m")))))

    In K61 Cell

    =VALUE(INT(K60)+INT(INT((K60-INT(K60))*100)/60)&"."&TEXT(MOD(INT((K60-INT(K60))*100),60),"00"))

    Format both the cells as General

  17. #17
    Forum Contributor
    Join Date
    04-18-2011
    Location
    Jeddah
    MS-Off Ver
    Excel 2007
    Posts
    362

    Re: Help with conditional time subtraction

    Sorry I missed your last reply, I will try the new formulas.
    Last edited by Khaldon; 04-09-2014 at 04:31 PM.

+ 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] Conditional Subtraction and Average
    By Fairish in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-10-2014, 08:43 AM
  2. Conditional formatting and subtraction
    By Bizzielizzie in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 03-21-2013, 07:24 PM
  3. Conditional formula (subtraction) please help
    By djcwerna in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-19-2013, 02:07 PM
  4. Time Subtraction
    By realniceguy5000 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-25-2009, 01:56 PM
  5. Conditional formula (subtraction)
    By dklein2149 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-27-2008, 10:59 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