+ Reply to Thread
Results 1 to 3 of 3

If statement to compare hours

  1. #1
    Registered User
    Join Date
    01-06-2015
    Location
    Malaysia
    MS-Off Ver
    2007
    Posts
    1

    If statement to compare hours

    Hi,

    Can someone please help me with my If statement (column M) in the attachment.

    I have time format in column L. I need to compare this time against the values below

    no. of P1 (column C) resolved <= 4.5h

    no. of P2 (column C) resolved <= 9.5h
    no. of P3 (column C) resolved <= 35h
    no. of P4 (column C) resolved <= 70h

    e.g. =IF(AND(C3="1",L3<4.5),"TRUE",IF(AND(C3=2,L3<9.5),"TRUE",IF(AND(C3="3",L3<35),"TRUE",IF(AND(C3=4,L3<70),"TRUE","FALSE"))))
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: If statement to compare hours

    Hi,

    Your formula is not consistent.
    With M3 you are testing C3 for the string values "1" or "3" and the numeric values 2 or 4.

    Change your "1" & "3" to 1 & 3
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,625

    Re: If statement to compare hours

    For Eg
    Please Login or Register  to view this content.

+ 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] Need help with if statement for commission and hours
    By JUDSON_IRELAND in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 05-07-2014, 11:15 AM
  2. Using hours and minutes in an If/Then statement
    By Ron Purpura in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-12-2013, 11:49 AM
  3. Replies: 4
    Last Post: 11-30-2011, 03:25 PM
  4. Replies: 3
    Last Post: 03-17-2005, 03:06 PM
  5. IF statement for hours/mins
    By k f h in forum Excel General
    Replies: 5
    Last Post: 03-12-2005, 01:06 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