+ Reply to Thread
Results 1 to 8 of 8

Argumentive functions, I am sure this an easy fix but I am horrible at Excell

  1. #1
    Registered User
    Join Date
    01-06-2016
    Location
    Houston
    MS-Off Ver
    2013
    Posts
    20

    Argumentive functions, I am sure this an easy fix but I am horrible at Excell

    I have a set of "Y"s and "N"s. These are outputted from other data sets that are not pertaining to this problem.

    Example:

    Y Y N
    N N Y
    Y N Y

    Each set of three outputs has a status, Either "ZERO", "TRUE", or "PLUS"

    Any Combination of a "N" in the 1st or 2nd position will always output a "ZERO"

    Y Y N = TRUE (always)
    Y Y Y = TRUE (if it proceeds a "PLUS")

    Y Y Y = "PLUS"

    Here is the issue... "ZERO" and "TRUE" are derived from the adjacent 3 conditional cells in that row. The "PLUS" Status is derived from the 3rd adjacent condition, but from the previous row is where it acquires its 1st and 2nd condition. There can not be two "PLUS" statuses one right after another and so it can either be a zero or a plus, but the formula I have so far can not distinguish the post "PLUS" status.



    =IF(AND(P4="Y",Q4="Y",R5="Y"),IF(OR(S4="PLUS",(AND(P4="Y",Q4="Y",R4="Y",P5="N",Q5="N",R5="Y"))),"TRUE","PLUS"),IF(AND(P5="Y",Q5="Y"),"TRUE","ZERO"))
    Last edited by Grefcon901; 01-06-2016 at 01:57 PM.

  2. #2
    Forum Contributor
    Join Date
    07-16-2013
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2013
    Posts
    176

    Re: Argumentive functions, I am sure this an easy fix but I am horrible at Excell

    A sample workbook would help.

  3. #3
    Registered User
    Join Date
    01-06-2016
    Location
    Houston
    MS-Off Ver
    2013
    Posts
    20

    Re: Argumentive functions, I am sure this an easy fix but I am horrible at Excell

    Here Is a sample
    Attached Files Attached Files

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Argumentive functions, I am sure this an easy fix but I am horrible at Excell

    Starting in D4, the output depends on 6 Y/N inputs (3 in the row above, plus 3 in the current row), and the value immediately above (T/P/Z).

    That's 2^6 * 3 = 192 possibilities, each of which generates a result of T, P, or Z.

    Rather than attempt to create a formula with some convoluted logic, you could make a table with 192 rows with all combinations of the inputs as catenated strings, add a column containing the output for each combination, and then just do a lookup.

    E.g. ,

    YYYYYYTRUE gives whatever
    YYYYYYPLUS gives whatever
    YYYYYYZERO gives whatever
    YYYYYNTRUE gives whatever
    ...

    Then I'd sort those in alphabetical order so I could use a range lookup.

    I'm not volunteering, but that's how I'd do it.
    Last edited by shg; 01-06-2016 at 03:50 PM.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Argumentive functions, I am sure this an easy fix but I am horrible at Excell

    You are going to have to spell out the rules in the order of precedence.

    YYN is TRUE
    IF YYY and Cell Below ="PLUS", TRUE else "PLUS" <- this excludes two plusses in a row.
    or is it the first two columns of the row above and the third column of the current row. The text says both.

    How do you determine how to assign a ZERO?

  6. #6
    Registered User
    Join Date
    01-06-2016
    Location
    Houston
    MS-Off Ver
    2013
    Posts
    20

    Re: Argumentive functions, I am sure this an easy fix but I am horrible at Excell

    Only the PLUS output will look to the previous row. TRUE and ZERO are derived from the adjacent cond. 1 & 2 in that row.

  7. #7
    Forum Contributor
    Join Date
    07-16-2013
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2013
    Posts
    176

    Re: Argumentive functions, I am sure this an easy fix but I am horrible at Excell

    I don't really understand your problem, but i made an attempt anyways. Here's my understanding of the problem:

    1. Any Combination of a "N" in the 1st or 2nd position will always output a "ZERO"
    2. YYN will always be "TRUE"
    3. Everything else is "PLUS"
    4. If there a "PLUS" on the next row, then it should be change to "TRUE"

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    01-06-2016
    Location
    Houston
    MS-Off Ver
    2013
    Posts
    20

    Re: Argumentive functions, I am sure this an easy fix but I am horrible at Excell

    Thank you so much! this did not give me what it needed but the model got me thinking in the correct direction to solve it!

    Thanks, Jon

+ 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. The Excell functions
    By pervezjan in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-21-2014, 09:13 AM
  2. SUM, IF, Frequency, COUNTIF, AND all rolled into one horrible package.
    By AlexanderW in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-05-2012, 02:03 PM
  3. [SOLVED] excell functions
    By dglass in forum Excel General
    Replies: 2
    Last Post: 08-21-2006, 09:05 AM
  4. [SOLVED] Office 2007- What a horrible disappointment
    By CMM in forum Excel General
    Replies: 8
    Last Post: 05-26-2006, 02:15 PM
  5. Horrible looking IF function....
    By rmellison in forum Excel General
    Replies: 3
    Last Post: 09-12-2005, 12:05 PM
  6. Replies: 1
    Last Post: 06-07-2005, 12:05 PM
  7. [SOLVED] easy calc excell
    By titont in forum Excel General
    Replies: 3
    Last Post: 03-12-2005, 04:06 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