+ Reply to Thread
Results 1 to 5 of 5

Conditional formula: Subtracting time

  1. #1
    Registered User
    Join Date
    11-01-2023
    Location
    Ireland
    MS-Off Ver
    MS 365 (v. 2308)
    Posts
    2

    Conditional formula: Subtracting time

    Hi all,

    First time poster and new member, but I have often found the answer on here before, so many thanks for that!

    I am working on a simple spread sheet where employees register their overtime for approval from management.
    Part of the overtime process is that the first hour overtime claimed in a week is forfeit, so I want to create a formula that will auto calculate that to ensure when the employee inputs their time, the gross weekly total will automatically be deducted by an hour.
    This is my first time working with an =IF formula, and I had thought it would work out like this, but it doesn't:

    =IF(I39:I45=">00:01",01:00,00:00)

    Attached is the layout I am working on. I2:I8 auto calculates to the weekly gross I9. If there is any value put into that column greater than 00:01, I would like the value in J9 to be 01:00. If there is no value in I2:I9, then I want the value in J9 to be 00:00. I can then get it to subtract J9 from I9 giving the net value in K9.
    I need the 00:00 value as an answer because this will affect the monthly total otherwise.

    Any help will be greatly appreciated!

    Dave
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,215

    Re: Conditional formula: Subtracting time

    We;come to the forum.

    Please update your forum profile to read MS 365 (v. 2308).

    Thank you.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,408

    Re: Conditional formula: Subtracting time

    You can use this formula in J9:

    =IF(I9>0,TIME(1,0,0),0)

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    11-01-2023
    Location
    Ireland
    MS-Off Ver
    MS 365 (v. 2308)
    Posts
    2

    Re: Conditional formula: Subtracting time

    Quote Originally Posted by Pete_UK View Post
    You can use this formula in J9:

    =IF(I9>0,TIME(1,0,0),0)

    Hope this helps.

    Pete
    That's solved it, thanks Pete!

  5. #5
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: Conditional formula: Subtracting time

    Just for the fun: =(I9>0)/24 does the same.

+ 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. Date Time subtracting formula
    By Lovemyexcel in forum Excel Formulas & Functions
    Replies: 28
    Last Post: 07-13-2023, 06:16 AM
  2. [SOLVED] subtracting 30 min lunch from a time formula
    By doop4204 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-29-2018, 01:49 PM
  3. [SOLVED] IF formula with conditional subtracting value
    By ricky84 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-25-2015, 11:22 AM
  4. [SOLVED] Excel formula for subtracting time. (Beginner here)
    By icetoken in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-09-2015, 03:51 PM
  5. [SOLVED] Help with formula for adding and subtracting time
    By Adorella in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-13-2013, 04:47 PM
  6. Formula to determine time by subtracting dates
    By MattG in forum Excel General
    Replies: 1
    Last Post: 02-25-2010, 11:31 AM
  7. Replies: 3
    Last Post: 09-29-2007, 04:58 PM

Tags for this Thread

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