+ Reply to Thread
Results 1 to 7 of 7

If Cell A value has Cell B value2 next to it, make Cell 3 based on the two

  1. #1
    Registered User
    Join Date
    10-23-2021
    Location
    London, England
    MS-Off Ver
    2016
    Posts
    9

    If Cell A value has Cell B value2 next to it, make Cell 3 based on the two

    Let's say the row with Fruit, State, Result is row 1, so the A,B,C and rows numbers are not cells. Result can be GOOD,BAD or IGNORE. State is True, False or None
    So actual data starts from row 2 and columns are A,B,C. What formula needed in C2 that calculates

    IF (all potatoes are TRUE OR NONE) AND (all tomatoes are TRUE OR NONE) then set Result to GOOD;
    ELSE IF (all potatoes are TRUE OR NONE but a tomato is FALSE (one or all)) then set Result to BAD
    ELSE (meaning if even one potato is FALSE) then set result to IGNORE

    Obviously exclude the Pickle from any conditions but it is getting in the way, you cannot just use range of cells unless with exclusion.

    A
    B
    C
    1
    Fruit
    State
    Result
    2 Potato True (formula needed)
    3 Potato True
    4 Tomato None
    5 Pickle False
    6 Potato True
    7 Tomato True
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: If Cell A value has Cell B value2 next to it, make Cell 3 based on the two

    Could you just complete the table so that I can confirm the expected results?
    If someone has helped you then please add to their Reputation

  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,523

    Re: If Cell A value has Cell B value2 next to it, make Cell 3 based on the two

    Try

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  4. #4
    Registered User
    Join Date
    10-23-2021
    Location
    London, England
    MS-Off Ver
    2016
    Posts
    9

    Re: If Cell A value has Cell B value2 next to it, make Cell 3 based on the two

    I will need to add another Pickle, so 8th row and new Result: Worst

    A
    B
    C
    1
    Fruit
    State
    Result
    2 Potato True (formula needed)
    3 Potato True
    4 Tomato None
    5 Pickle False
    6 Potato True
    7 Tomato True
    8 Pickle True

    The above formula works, thx, but I will need to advance it a little bit, could be done so?



    Better show in diagram, here is also another
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by programm; 08-26-2022 at 07:00 AM.

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

    Re: If Cell A value has Cell B value2 next to it, make Cell 3 based on the two

    I don't understand why the result for row 8 should be worst as no Potato has a state of FALSE.
    Here is the formula that I propose based on the diagram in post #4:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Based on the values in A2:B8, please tell us which results are incorrect and why.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  6. #6
    Registered User
    Join Date
    10-23-2021
    Location
    London, England
    MS-Off Ver
    2016
    Posts
    9

    Re: If Cell A value has Cell B value2 next to it, make Cell 3 based on the two

    I don't understand why the result for row 8 should be worst as no Potato has a state of FALSE.
    I should have made the table have one Potato = False then, for testing purposes, I will have such cases there where a Potato is false and it should go to 'Worst' as shown.

    The system will be re-used and the true and false will differ, it is not the entire data and not all rows that would be. I am for the working formula logic-wise and syntax-wise.

    ===================

    Thanks the above works, I also have a TBD which I did not post to not confuse, and I added without a problem as beginning of the IFs and it all works according to diagram. Posting this for reference and such:

    Please Login or Register  to view this content.

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

    Re: If Cell A value has Cell B value2 next to it, make Cell 3 based on the two

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ 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] Make Cell Show Certain Pay Rate Based on Cell in Another Sheet
    By jbransden in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-15-2017, 06:23 AM
  2. A formula to make a cell equal to another cell based on a condition
    By wildenbeast in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-22-2016, 09:02 PM
  3. VBA Code to Make a Cell Value Negative Based on Content of Adjacent Cell
    By Court Manager in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-08-2014, 04:18 PM
  4. [SOLVED] How do I make a cell use different formulas based off of another cell's input?
    By soonerexcel73 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-24-2013, 02:23 AM
  5. Replies: 0
    Last Post: 03-08-2013, 06:34 AM
  6. Replies: 4
    Last Post: 12-12-2012, 03:03 PM
  7. VBA select cell range based upon the # of rows that make up a certain merged cell?
    By clemsoncooz in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-04-2012, 12:22 PM

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