+ Reply to Thread
Results 1 to 4 of 4

How can I avoid large, nested IF AND OR queries

  1. #1
    Registered User
    Join Date
    11-05-2010
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    31

    How can I avoid large, nested IF AND OR queries

    Hello,

    here's [what should be] a simple formula I ofen struggle with; nested IF statements.

    In the attached spreadsheet I need to carry out 15 numerical checks based on what the current value of another field is. Is this possible in a shorter formula to avoid nesting 15 IF AND OR formulas.

    As explained in the spreadsheet:

    B4 to B18 is static
    C4 to C18 is variable
    E4 to E18 is variable within a range

    Each cell in the range G4 to G18 needs to carry out 15 TRUE/FALSE tests (examples below), but within a single formula

    If any one of the tests are TRUE then a return of TRUE is required

    Hope someone can help.

    Regards,

    sherlock99.
    Attached Files Attached Files
    Last edited by sherlock99; 01-19-2011 at 07:56 AM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: How can I avoid large, nested IF AND OR queries

    This will return you 0/1

    =(B4=ROWS($A$1:A1))*(C4<0)

    This will return you FALSE/TRUE

    =(B4=ROWS($A$1:A1))*(C4<0)=1

    But I still don't know what E column shoudl do?
    Last edited by zbor; 01-19-2011 at 06:51 AM.

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: How can I avoid large, nested IF AND OR queries

    I don't understand why G16 should be TRUE given G16 is 1 and C4 is 10 (ie not < 0)

    Based on my interpretation:

    Please Login or Register  to view this content.
    If G16 were 13 then the result would be TRUE

    (you could use an INDEX approach also but SUMIF is perhaps more robust)

  4. #4
    Registered User
    Join Date
    11-05-2010
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: How can I avoid large, nested IF AND OR queries

    Thanks for the replies.

    I didnt explain properly zbor, sorry , but DonkeyOte has somehow read my mind and correctly interpreted my requirements.

    The idea was that if the chosen team number in column E and the looked up value in column C (by virtue of its association with the colun B number) was <0 then give a TRUE value.

    For example, I change E4 to 6. I want G4 to look and see if C9 is <0.

    Many thanks for your replies.

    Regards,

    Sherlock99.

+ 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