+ Reply to Thread
Results 1 to 7 of 7

Multiple Nested IF Statement error

Hybrid View

  1. #1
    Registered User
    Join Date
    06-23-2014
    Location
    MidWest, USA
    MS-Off Ver
    2016
    Posts
    89

    Multiple Nested IF Statement error

    Hello,
    I'm working on a nested if statement in Excel 2010 that is giving me an error. I'm pasting the code below. The first segment is one I am using currently and it works fine. The 2nd segment is the one returning an error. The only difference is the 2nd one has 1 extra condition added on the end. Both segments are referencing the same Table. I'm sure it is a syntax error, but the parentheses and commas all look correct to me. Much appreciate any assistance!

    =IF(OR([@SurveyProcessor]="Miles Farmer", [@SurveyProcessor]="Amy Patterson", [@SurveyProcessor]="Chelsea Largent", [@SurveyProcessor]="Danielle Melick", [@SurveyProcessor]="Julie Lovich", [@SurveyProcessor]="Tonia Bonavito", [@SurveyProcessor]="Shannon Garvey", [@SurveyProcessor]="Jenna Gonzalez"), "Shannon Garvey", IF(OR([@SurveyProcessor]="Mikayla Moten", [@SurveyProcessor]="Breana Davis", [@SurveyProcessor]="Chelsea Liu", [@SurveyProcessor]="Colton Rice", [@SurveyProcessor]="Danielle Gosch", [@SurveyProcessor]="Sam Kincy", [@SurveyProcessor]="Tyler Bailes", [@SurveyProcessor]="James Punches", [@SurveyProcessor]="Brooke Hamel", [@SurveyProcessor]="Sherry Strausbaugh"), "Brooke Hamel", ""))

    =IF(OR([@SurveyProcessor]="Miles Farmer", [@SurveyProcessor]="Amy Patterson", [@SurveyProcessor]="Chelsea Largent", [@SurveyProcessor]="Danielle Melick", [@SurveyProcessor]="Julie Lovich", [@SurveyProcessor]="Tonia Bonavito", [@SurveyProcessor]="Shannon Garvey", [@SurveyProcessor]="Jenna Gonzalez"), "Shannon Garvey", IF(OR([@SurveyProcessor]="Mikayla Moten", [@SurveyProcessor]="Breana Davis", [@SurveyProcessor]="Chelsea Liu", [@SurveyProcessor]="Colton Rice", [@SurveyProcessor]="Danielle Gosch", [@SurveyProcessor]="Sam Kincy", [@SurveyProcessor]="Tyler Bailes", [@SurveyProcessor]="James Punches", [@SurveyProcessor]="Brooke Hamel", [@SurveyProcessor]="Sherry Strausbaugh"), "Brooke Hamel", IF([@SurveyLender]="CACU", "Brian Luger),"Client"))

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2508 Build 16.0.19127.20082) 64-bit
    Posts
    31,733

    Re: Multiple Nested IF Statement error

    Try

    =IF(OR([@SurveyProcessor]="Miles Farmer", [@SurveyProcessor]="Amy Patterson", [@SurveyProcessor]="Chelsea Largent", [@SurveyProcessor]="Danielle Melick", [@SurveyProcessor]="Julie Lovich", [@SurveyProcessor]="Tonia Bonavito", [@SurveyProcessor]="Shannon Garvey", [@SurveyProcessor]="Jenna Gonzalez"), "Shannon Garvey", IF(OR([@SurveyProcessor]="Mikayla Moten", [@SurveyProcessor]="Breana Davis", [@SurveyProcessor]="Chelsea Liu", [@SurveyProcessor]="Colton Rice", [@SurveyProcessor]="Danielle Gosch", [@SurveyProcessor]="Sam Kincy", [@SurveyProcessor]="Tyler Bailes", [@SurveyProcessor]="James Punches", [@SurveyProcessor]="Brooke Hamel", [@SurveyProcessor]="Sherry Strausbaugh"), "Brooke Hamel", IF([@SurveyLender]="CACU", "Brian Luger","Client")))

  3. #3
    Registered User
    Join Date
    06-23-2014
    Location
    MidWest, USA
    MS-Off Ver
    2016
    Posts
    89

    Re: Multiple Nested IF Statement error

    Wow, thanks! Just moved the parentheses to the end then right? Works great now....

  4. #4
    Registered User
    Join Date
    06-23-2014
    Location
    MidWest, USA
    MS-Off Ver
    2016
    Posts
    89

    Re: Multiple Nested IF Statement error

    The error message/help for nested if statements aren't too helpful I've noticed.

  5. #5
    Registered User
    Join Date
    06-23-2014
    Location
    MidWest, USA
    MS-Off Ver
    2016
    Posts
    89

    Re: Multiple Nested IF Statement error

    Very well, thank you kindly!

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,053

    Re: Multiple Nested IF Statement error

    NO, because in their basic form, they are pretty simple...

    =if(test, do-this-if-true, do-that-if-false)

    When you start nesting, it works on the exact same principal, you just need to keep the logic simple

    =if(test,if(2nd test( do-this-if-true, do-that-if-false),do-that-if-false...from 1st test)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2508 Build 16.0.19127.20082) 64-bit
    Posts
    31,733

    Re: Multiple Nested IF Statement error

    Thank you the feedback and rep.

    Could 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. Nested IF statement error. Nested True statement is not triggering
    By Lucas7040 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-26-2016, 11:41 AM
  2. Replies: 2
    Last Post: 07-09-2015, 04:25 PM
  3. [SOLVED] Nested AND statement Error
    By mdovey in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-25-2013, 08:41 PM
  4. [SOLVED] IS ERROR with nested if statement
    By renden in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-06-2012, 05:46 AM
  5. Error on Nested If Statement
    By ValentineNicole in forum Excel General
    Replies: 5
    Last Post: 02-18-2011, 03:29 PM
  6. Subscript out of range error when using nested if statement
    By bradshaw in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 08-30-2008, 11:39 AM
  7. nested if statement returns #value error
    By aksaunders@affiniongroup.com in forum Excel General
    Replies: 3
    Last Post: 08-10-2006, 11:30 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