+ Reply to Thread
Results 1 to 3 of 3

Need help with "IF" formula

  1. #1
    Registered User
    Join Date
    01-02-2014
    Location
    Cape Town
    MS-Off Ver
    Excel 2007
    Posts
    88

    Need help with "IF" formula

    Good day
    I need different results when subtracting start / end times - see attached worksheet
    I managed to get the results in column H19 if the shift name is "Non_Shift" but in column H18, when shift name is different to "Non_Shift" I need the result to be 10.5 hours, pls can you assist?
    "
    Attached Files Attached Files

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Need help with "IF" formula

    First, you file has links to files unavaliable to us since it's your path O:....
    And please explain a little more about that 'Non_Shift",is that a default value for the Non_Shift line?
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Need help with "IF" formula

    Try in H18

    =IF(C18="","",IF(C18="Non_Shift",(G18-F18)*24,IF(F18>G18,(G18-F18+1)*24,(G18-F18)*24)))


    Is there a half an hour deduction that needs to be built in? If so, use

    =IF(C18="","",IF(C18="Non_Shift",(G18-F18)*24-0.5,IF(F18>G18,(G18-F18+1)*24,(G18-F18)*24)-0.5))
    Life's a spreadsheet, Excel!
    Say thanks, Click *

+ 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] Brief formula to convert time values to "shift1", "shift2", "shift3".
    By darekpawel in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 04-11-2019, 07:05 AM
  2. [SOLVED] Need some Help to Solve the formula of "Promoted" "Fail" or "Pass"
    By vijubhau in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 03-28-2019, 01:44 AM
  3. Replies: 5
    Last Post: 02-05-2019, 12:03 AM
  4. Replies: 4
    Last Post: 06-11-2017, 02:03 PM
  5. [SOLVED] Column X-Ref list - Sheet1 Col A "pages", Col B:FL "Req" to Sheet2 ColA "req", ColB "page"
    By excel-card-pulled in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-07-2017, 09:30 AM
  6. Replies: 5
    Last Post: 10-12-2010, 06:46 AM
  7. [SOLVED] If changed array formula reduce ""\""\""\ - signs to #Missing, will it make ...
    By Maria J-son in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2006, 08:25 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