+ Reply to Thread
Results 1 to 8 of 8

3 value if sentence

  1. #1
    Registered User
    Join Date
    08-12-2012
    Location
    kusilaakso
    MS-Off Ver
    Excel 2003
    Posts
    10

    3 value if sentence

    Hi.

    I am facing troubles when I'm trying to get TRUE or FALSE with these values:

    value A: 50
    value B: 100
    value C: 150

    So value should be TRUE if A and B are smaller than C. And FALSE if A is smaller than C but B is greater than C.

    Would someone more experienced tell me right formula to do such calculation?

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: 3 value if sentence

    Try

    =IF(AND(A1<C1,B1<C1),TRUE,IF(AND(A1<C1,B1>C1),FALSE))
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: 3 value if sentence

    suppose

    cell A1 50
    cell A2 100
    cell A3 150


    =if(and(a1<a3,a2<a3),"TRUE","FALSE")

    this is FALSE also when A1>A3 and A2<A3

  4. #4
    Registered User
    Join Date
    08-12-2012
    Location
    kusilaakso
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: 3 value if sentence

    It's working! Sorry fotis, i didn't read your autofilled text first. :P TY!
    Last edited by piiska; 03-31-2013 at 01:22 PM.

  5. #5
    Registered User
    Join Date
    08-12-2012
    Location
    kusilaakso
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: 3 value if sentence

    Now another problem.

    It should now be TRUE if A and B values are BOTH smaller or greater than C. and FALSE if only A or B is greater than C. Hope you understood what I am after.
    Last edited by piiska; 03-31-2013 at 01:41 PM.

  6. #6
    Registered User
    Join Date
    08-12-2012
    Location
    kusilaakso
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: 3 value if sentence

    Is that formula even possible?

  7. #7
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: 3 value if sentence

    Try

    =IF(OR(AND(A1<=C1,B1<=C1),AND(A1>C1,B1>C1)),TRUE,IF(OR(A1>C1,B1>C1),FALSE))

  8. #8
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: 3 value if sentence

    You can shorten Fotis' solution to this even:
    =IF(OR(AND(A1<=C1,B1<=C1),AND(A1>C1,B1>C1)),TRUE,FALSE)

    as that if the first portion is False, then only 1 of the values is larger than C1

    Hope this helps
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

+ 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.6.0 RC 1