+ Reply to Thread
Results 1 to 2 of 2

Thread: Argument IF for time (hours)

  1. #1
    Registered User
    Join Date
    01-06-2010
    Location
    Carolina Beach, NC
    MS-Off Ver
    Excel 2003
    Posts
    2

    Argument IF for time (hours)

    I fail to formulate argument similar to: =IF(A13>=40,40,A13), but use hours instead of numbers, ie, IF A13 (say 44:25:00) is greater or equal to 40:00:0, then 40:00:00.
    And another argument: IF A13 is greater than 40:00:00, then 44:25:00-40:00:00.
    Can anyone help? Thanks.

  2. #2
    Forum Guru
    Join Date
    10-28-2008
    Location
    Not here anymore
    MS-Off Ver
    irrelevant
    Posts
    10,151

    Re: Argument IF for time (hours)

    Hi Itzhaky,

    welcome to the forum.

    This seems tricky but is really easy to resolve. Enter the time value as a text "44:00:00", wrap it in () braces and preceed it with the double unary --, like this

    =IF(A13>=--("40:00:00"),--("40:00:00"),etc....)

    The -- will coerce the text into a numeric value. Just format the result with custom format [hh]:mm:ss, as the other cells

    hth

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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.2.0