+ Reply to Thread
Results 1 to 3 of 3

Using OR with IF to test for several possibilities

  1. #1
    Registered User
    Join Date
    02-10-2014
    Location
    Minnesota
    MS-Off Ver
    Excel 2007
    Posts
    5

    Using OR with IF to test for several possibilities

    Hi, this is related to a thread that daffodil11 kindly solved earlier: http://www.excelforum.com/excel-form...ml#post3849778

    How can I structure an IF statement with OR so that it returns "true" for more than one condition: Data!$A$2:$A$20=B2 OR Data!$A$2:$A$20=A2 ?

    The function I have now

    {=IFERROR(STDEV(IF(OR(Data!$A$2:$A$20=B2,Data!$A$2:$A$20=A2),Data!$B$2:$B$20)),"Not Enough Data")}

    seems to calculate on ALL the states shown in the data tab.

    Hopefully the sample workbook attached helps illustrate.

    Thank you
    Attached Files Attached Files

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Using OR with IF to test for several possibilities

    Try this.....(Since this is an Array Formula so remember to confirm it with Ctrl+Shift+Enter )
    Please Login or Register  to view this content.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Registered User
    Join Date
    02-10-2014
    Location
    Minnesota
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Using OR with IF to test for several possibilities

    Wow - what a great trick. Works perfectly.

    Thanks so much. This is a great forum!

+ 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. Vlookup & Sum if possibilities
    By dcad81 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-26-2013, 06:00 PM
  2. [SOLVED] IF function with three different possibilities
    By kbriaz in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-25-2013, 08:19 PM
  3. Pull sub-test scores from test w/best overall test score (PSAT)
    By PowerSchoolDude in forum Excel General
    Replies: 0
    Last Post: 11-19-2009, 08:29 PM
  4. Conditional w/ three possibilities
    By MathDoctor in forum Excel General
    Replies: 4
    Last Post: 06-11-2005, 11:05 AM

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