+ Reply to Thread
Results 1 to 4 of 4

If function for time more or equal to 2 minutes

  1. #1
    Registered User
    Join Date
    05-06-2014
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    7

    If function for time more or equal to 2 minutes

    Hi
    I am a total newbie in Excel. I've been trying to find an answer to my problem on multiple forums without success. Can someone help me step by step resolve my issue.

    I have in Column E(E1: E703) a list of time differences in the following format: 0:02:14 with hh:mm:ss
    I managed to obtain these time differences by doing the following formula: =TEXT(B5-B4,"h:mm:ss")

    In column F, I want to create a formula that labels all values more or equal to 1 minute from Column E and label those as "new animal".
    I have tried the following formula for cell E11 with value 0:04:38 (clearly over 1 minute):
    =IF(E11>TIME(0,1,0),1,"new animal") but it shows up as "1".

    Can someone clearly explain to me what I am doing wrong?
    Thanks a lot
    Charlotte

  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: If function for time more or equal to 2 minutes

    Use value in-front of E11 reference. Because you used =TEXT(B5-B4,"h:mm:ss") which will get only the text output instead of real time.

    =IF(value(E11)>TIME(0,1,0),1,"new animal")


    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
    Registered User
    Join Date
    05-06-2014
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: If function for time more or equal to 2 minutes

    Hi
    Thanks for your help but it does not work. All results come up as "animal" even if it's less than 1 minute.
    Can someone help me with this?
    I've put the exact same formula but does not work.
    Cheers
    Charlotte

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: If function for time more or equal to 2 minutes

    Can someone clearly explain to me what I am doing wrong?
    You're using this formula:

    =TEXT(B5-B4,"h:mm:ss")
    That is returning a TEXT string. Then you're comparing the text value against the numeric value of TIME(0,1,0). In Excel TEXT has a higher value than any number so:

    E11>TIME(0,1,0) will ALWAYS be TRUE which is why your formula always returns 1.

    Instead of:

    =TEXT(B5-B4,"h:mm:ss")

    All you need is:

    =B5-B4

    Then format as h:mm:ss

    You should be able to use your original formula (unless the cell format of E11 is screwed up!):

    =IF(E11>TIME(0,1,0),1,"new animal")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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] COUNTIFS function w/greater than or equal to, and less than or equal to time values
    By AliciaRenee in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-27-2014, 03:57 PM
  2. trying to convert a number into minutes and add minutes to a starting time
    By crbazzer in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-28-2013, 09:26 AM
  3. [SOLVED] Creating a gap function between 2 time stamps and changing that to minutes
    By bigern87 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-11-2012, 04:58 PM
  4. Using text function to convert time to minutes
    By koochandkai in forum Excel General
    Replies: 2
    Last Post: 08-09-2011, 08:28 AM
  5. Replies: 5
    Last Post: 04-12-2005, 05:06 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