+ Reply to Thread
Results 1 to 8 of 8

Compare values and return Boolean value

  1. #1
    Registered User
    Join Date
    04-23-2016
    Location
    Hyderabad
    MS-Off Ver
    Excel 2003
    Posts
    5

    Compare values and return Boolean value

    Hello Team,

    Hope you all are doing well!

    So I'm trying to automate our metrics sheet where the data in it contains SLA in hours 1,5,24 respectively in one column -- Lets say Column A.

    In the other column -- column B, I've the actual time taken to complete the task.

    Following are the conditions:

    1. If A=1 & B >1.5, return NotMet, else return Met
    2. If A=5 & B>5.5, return NotMet, else return Met
    3. If A=24 & B>5.5, return Non Met, else return Met

    Sample Data:

    A B C = Output bolean Met/NotMet
    1 2.3 Formula?
    5 3.1
    24 4.5
    1 5
    5 6.9
    24 0.79

    Could you help me with a formula where I can get the output required?

    Thank you for looking into it.

    Looking forward to your response.

    Best,

    Krishna

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: Compare values and return Boolean value

    Try

    =IF(OR(AND(A1=1,B1>1.5),AND(A1=5,B1>5.5),AND(A1=24,B1>5.5)),"NotMet","Met")

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: Compare values and return Boolean value

    Try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: Compare values and return Boolean value

    Sorry for the echo; getting slow in my old age. Trying to type a formula on an iPad doesn't help

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: Compare values and return Boolean value

    or ...

    =IF(AND(OR($A2=1,$A2=5,$A2=24),$B2>5.5),"NotMet","Met")

  6. #6
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,913

    Re: Compare values and return Boolean value

    or try ...
    =IF(OR(AND(A1=1,B1>1.5),AND(B1>5.5,OR(A1={24,5}))),"NotMet","Met")

  7. #7
    Registered User
    Join Date
    04-23-2016
    Location
    Hyderabad
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Compare values and return Boolean value

    Hello Team,

    That's brilliant! Thanks a lot for your support. That was really quick.

    The issue is now resolved.

    I tried to find the formula since few days, but in vain. It's always better to talk to the correct person(s).

    Could you please share a website where I can understand and write formulas in Excel.

    Best,

    Krishna

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: Compare values and return Boolean value

    Search the net but here is one site:

    http://www.free-training-tutorial.com/edit.html

    As your problem has been addressed, can you please mark the thread as solved ("Thread Tools" at top of first post).

+ 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] Compare 3 cells and return various values
    By alanina in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-22-2015, 06:31 AM
  2. Compare values in two columns and return values from a third
    By Ender1771 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-24-2013, 11:08 AM
  3. Index/Match to return values to compare
    By Iptgfs in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-01-2013, 12:39 PM
  4. [SOLVED] Compare and return similar values
    By jackyong1985 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-30-2012, 11:59 AM
  5. Compare values with 2 columns and return from the third
    By fms_me in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-14-2010, 07:57 AM
  6. compare 2 values and return value
    By wintermute in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-13-2010, 02:52 PM
  7. [SOLVED] Return boolean if sheet is currently protected
    By Mike in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-18-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