+ Reply to Thread
Results 1 to 4 of 4

Nested IF statement error. Nested True statement is not triggering

  1. #1
    Registered User
    Join Date
    05-26-2016
    Location
    Nope
    MS-Off Ver
    2013
    Posts
    2

    Nested IF statement error. Nested True statement is not triggering

    Hi,

    I'm having some problems with a nested Excel IF statement.
    The statement is meant to show:
    X if both C3 AND E3 are not 0.
    Y if C3 OR E3 have a value that isn't 0.
    Z if both C3 and E3 have values of 0.

    This is what I have so far...
    =IF((C3<>0)*AND(E3<>0),"X",IF(((C3<>0)*OR(E3<>0)),"Y","Z"))

    Y is not being triggered

    I'm using Excel 2013. Assistance would be greatly appreciated!

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Nested IF statement error. Nested True statement is not triggering

    Your AND and OR syntax is wrong..


    (C3<>0)*AND(E3<>0)
    That is written like
    AND(C3<>0,E3<>0)

    (C3<>0)*OR(E3<>0)
    Should be
    OR(C3<>0,E3<>0)


    Hope that helps.

  3. #3
    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,000

    Re: Nested IF statement error. Nested True statement is not triggering

    try

    =IF(AND(C3<>0,E3<>0),"X",IF(OR(C3<>0,E3<>0),"Y","Z"))

  4. #4
    Registered User
    Join Date
    05-26-2016
    Location
    Nope
    MS-Off Ver
    2013
    Posts
    2

    Re: Nested IF statement error. Nested True statement is not triggering

    It worked! THANK YOU!
    Farewell from an excel newbie.

+ 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] Nested AND statement Error
    By mdovey in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-25-2013, 08:41 PM
  2. Nested IF Statement comparing Dates, getting #VALUE error
    By jrace in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-14-2013, 10:01 AM
  3. [SOLVED] Prevent #VALUE error while using SEARCH nested within an IF statement
    By rfernandes in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-23-2012, 09:56 AM
  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. Replies: 6
    Last Post: 01-14-2009, 06:59 PM
  7. 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
  8. 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