+ Reply to Thread
Results 1 to 9 of 9

Return "True" when row 2 and the corresponding row beneath both contain "yes"

  1. #1
    Registered User
    Join Date
    03-31-2020
    Location
    Denver, CO
    MS-Off Ver
    365
    Posts
    4

    Return "True" when row 2 and the corresponding row beneath both contain "yes"

    Hi, I'd appreciate any help developing the shortest formula reasonably possible.

    Function is to return "True", when row 2 and the corresponding row beneath both contain "yes"

    Thanks in advance


    2020-03-31 11_04_46-Book1.xlsx - Excel.png

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Shortening a Formula

    *****Late edit. G2:X2 should have been Absolute.i.e. $G$2:$X$2


    Hi and welcome to the forum.

    We generally prefer to see the workbook, if only to test a solution, so please upload the workbook or a representative cut down copy, anonymised if necessary. It is always easier to advise if we can see your request in its context.

    Show a before and after situation with manually calculated results, explaining which information is data and which is results, and if it's not blindingly obvious how you have arrived at your results some explanatory notes as well.

    To upload a file click the Go Advanced button at the foot of your post, look underneath the post area for the Manage Attachments section and take it from there.

    In addition please clarify whether all relevant columns must be Yes or is it sufficient that one of them has a Yes for any particular row.

    Untested but maybe in B4 as an array formula entered with Ctrl-Shift-Enter and Copied down

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    adjust the column X as necessary
    Last edited by Richard Buttrey; 03-31-2020 at 04:21 PM.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    03-31-2020
    Location
    Denver, CO
    MS-Off Ver
    365
    Posts
    4

    Re: Shortening a Formula

    Thought I did include an upload. Sorry, newbee. Trying again
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Shortening a Formula

    So everytime a Yes appears in row 2, there should be a corresponding Yes in the same column in the corresponding row? I don't see that for row 7 so B7 should be false?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Registered User
    Join Date
    03-31-2020
    Location
    Denver, CO
    MS-Off Ver
    365
    Posts
    4

    Re: Shortening a Formula

    Hi ChemistB,

    A "yes" in the first location does not mandate a "yes" in the second location. The two locations are independently variable. The "True" result is only generated when BOTH locations contain "yes".

  6. #6
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Return "True" when row 2 and the corresponding row beneath both contain "yes"

    Hi,

    In B4:

    =COUNTIFS(G$2:IR$2,"Yes",G4:IR4,"Yes")>0

    and copied down.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  7. #7
    Registered User
    Join Date
    03-31-2020
    Location
    Denver, CO
    MS-Off Ver
    365
    Posts
    4

    Re: Return "True" when row 2 and the corresponding row beneath both contain "yes"

    Thanks XOR LX! This works great, and is much shorter than the way I was going at it. Very helpful!

    Ross

  8. #8
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Return "True" when row 2 and the corresponding row beneath both contain "yes"

    You're welcome!

    Cheers!

  9. #9
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Return "True" when row 2 and the corresponding row beneath both contain "yes"

    Just a quick point.

    XOR's formula is counting the number of Yess in row 2 and the relevant row. As far as I can see it won't take into account the last condition in your #5 which I assume to mean that there must be a Yes in the same column on each row for each Yes column in Row 2.

    Or maybe I'm missing something.

+ 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: 3
    Last Post: 08-16-2018, 06:07 AM
  2. Replies: 1
    Last Post: 08-16-2016, 07:26 AM
  3. [SOLVED] How to return the value of a cell beneath a cell with a specific value
    By Monkihunta in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-14-2014, 11:15 AM
  4. [SOLVED] Fill in missing values of one row with the rows beneath it if the rows beneath match
    By ilikeexcel in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-20-2012, 02:40 PM
  5. [SOLVED] Return Dates From Row 1 depending upon the data in rows beneath...
    By lifeisaspreadsheet in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-08-2012, 02:13 AM
  6. [SOLVED] Search for 2 true arguments and return true or false
    By David in forum Excel General
    Replies: 3
    Last Post: 07-15-2006, 05:20 AM
  7. Function to return True/False if all are validated as True by ISNU
    By Tetsuya Oguma in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-15-2006, 06: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