+ Reply to Thread
Results 1 to 4 of 4

If statement missing segment

  1. #1
    Registered User
    Join Date
    01-16-2019
    Location
    Bristol
    MS-Off Ver
    10
    Posts
    2

    If statement missing segment

    Hi

    I have data which looks like;

    1 Case w x y z aa
    2 Case 1 Reason 1 Reason 2 Reason 3 0
    3 Case 1 Reason 1 Reason 2 Reason 3 Reason 4 1
    4 Case 2 Reason 1 0
    5 Case 2 Reason 1 Reason 2 0

    In AA is the following code.

    Please Login or Register  to view this content.
    In AA5 I want to return 1 as the line relating to case 2 with the most information.

    I know there is a section of code missing but I can't work out where.

    Any help appreciated.
    Last edited by Dan190984; 02-01-2021 at 11:54 AM.

  2. #2
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: If statement missing segment

    Case 2 is saying return "0"
    Maybe you should change the red result to "1"?

    IF(AND(X2=X3,Y2=Y3,Z2=Z3),0,

  3. #3
    Registered User
    Join Date
    01-16-2019
    Location
    Bristol
    MS-Off Ver
    10
    Posts
    2

    Re: If statement missing segment

    That still returns "0" in aa5.

    At the min the bits ending
    Please Login or Register  to view this content.
    and
    Please Login or Register  to view this content.
    mean if Y or Z are empty I get a desired result but I need similar for X. Somewhere I think I need
    Please Login or Register  to view this content.
    but I don't know where.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: If statement missing segment

    Assuming that the column header aa is in cell F1:
    Paste the following into cell G2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Paste the following into cell F2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Select F2:G2 and drag the fill handle down to cell G5.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. IF Statement - Nested - Error saying Missing Parentheses
    By zaimink in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-30-2016, 08:22 PM
  2. missing somethingin this statement
    By i2trader in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-06-2016, 05:57 PM
  3. IF Statement and Vlookup Formula....something small missing!! HELP!
    By Nicole Matthews in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-22-2014, 11:34 AM
  4. [SOLVED] IF statement missing parenthesis in formula
    By Abyrose in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-15-2014, 06:24 PM
  5. [SOLVED] What is wrong with my code here? (Missing IF or End Sub statement?)
    By Brookshire in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-23-2013, 01:32 PM
  6. Replies: 3
    Last Post: 11-26-2009, 03:39 PM
  7. If Statement in Function code, what is missing?
    By ChicPea in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-22-2009, 03:33 AM

Tags for this Thread

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