+ Reply to Thread
Results 1 to 6 of 6

Nested If & And functions not working

  1. #1
    Registered User
    Join Date
    04-20-2014
    Location
    Derby
    MS-Off Ver
    Excel 2010
    Posts
    59

    Nested If & And functions not working

    Hi,

    I have been trying to get a nested if & and function to work correctly, no doubt I will be missing the obvious.

    I am truing to test if a cell contains a word, and also in the same row the other two cells should be blank, in which case the If will be true, and return the true statement. I can get one IF/AND function to work, but when I add the next test I end up getting #value, I have tried several ways round and even an OR after the first statement, which allow either the first statement to be true or the second or the third. I have attached an example spreadsheet.

    I would be happy if the solution was in a function form or in a VBA code form, I would be happy if it just worked!

    many thanks in anticipation.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Nested If & And functions not working

    e2 = if(and(A2<>"",C2<>""),A2&" & "&C2,if(A2<>"",A2,if(and(B2<>"",C2<>""),B2&" & "&C2,if(B2<>"",B2,if(C2<>"",C2;""))))) and drag down.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    04-20-2014
    Location
    Derby
    MS-Off Ver
    Excel 2010
    Posts
    59

    Re: Nested If & And functions not working

    Good afternoon,

    I notice that the last C2 there is semi colon, and no <>, also that where column C is the only cell in the row that has text in it, the result is TRUE, rather than Rotherham, if I put either Leeds or Doncaster in column A or B, then I get the correct result.

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,406

    Re: Nested If & And functions not working

    Another way:

    In E2 filled down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    This works for your example. How does it do with the 'live' data?
    Dave

  5. #5
    Registered User
    Join Date
    04-20-2014
    Location
    Derby
    MS-Off Ver
    Excel 2010
    Posts
    59

    Re: Nested If & And functions not working

    Hi,

    this works great on the live data.

    many thanks.

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,406

    Re: Nested If & And functions not working

    You're welcome. Thanks for the feedback and the rep.

+ 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. Replies: 6
    Last Post: 03-17-2015, 01:35 AM
  2. Nested Functions with SUMIF and TEXT Not Working
    By Jerryz in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-01-2014, 04:52 PM
  3. Problems working with Nested IF and AND Functions in formulas and Summation.
    By GinglesBingo in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-25-2013, 06:31 PM
  4. AddIn With custom functions - Functions not working in Excel2010
    By brum17 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-10-2011, 08:25 AM
  5. Nested IF functions stop working after 8th nesting
    By kafukalatrava in forum Excel General
    Replies: 4
    Last Post: 04-06-2011, 07:47 AM
  6. Nested IF functions not working for more than 2 nests
    By yousafkhan1976 in forum Excel General
    Replies: 2
    Last Post: 03-14-2011, 12:49 PM
  7. Nested functions HELP!
    By chiefnmd in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 07: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