+ Reply to Thread
Results 1 to 10 of 10

If Statements: If Multiple Cell (within a range) contains "x" then Return yes/no

  1. #1
    Registered User
    Join Date
    05-28-2014
    Posts
    5

    If Statements: If Multiple Cell (within a range) contains "x" then Return yes/no

    Hi there,
    I need to create a function to look at a range of 4 cells, that include yes, or no. If more than one of those cells has Yes, then return Yes into a 5th cell... (and if more than one has No, then return no) I know it is an if statement, but not sure how to do the "look for multiples"...
    thanks!

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,799

    Re: If Statements: If Multiple Cell (within a range) contains "x" then Return yes/no

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    05-28-2014
    Posts
    5

    Re: If Statements: If Multiple Cell (within a range) contains "x" then Return yes/no

    HI there,
    Basically what I want to automate is taking the data in columns A, B, C, and D, if there is more than one "YES" in those columns, return an answer of "YES" in column E. If there is only one Yes, return an answer of NO. The no's in columns A,B,C,D can essentially be ignored.
    Thanks for your help
    Excel Forum Workbook.xlsx

  4. #4
    Valued Forum Contributor Saarang84's Avatar
    Join Date
    02-19-2009
    Location
    Chennai, India
    MS-Off Ver
    XL 2003 to 2010
    Posts
    812

    Re: If Statements: If Multiple Cell (within a range) contains "x" then Return yes/no

    Hi,

    Welcome to the Forum.

    Either of these formulas will work (place it in the Mixed column) :
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    or
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If my assistance has helped, there is a reputation icon * on the left hand corner below the post - you can show your appreciation to the user who has helped in resolving your requirement.

    If your requirement has been solved please mark your thread as Solved.
    In the menu bar above the very first post, select Thread Tools, then select "Mark this thread as Solved".

    Kindly use [FORMULA] or [CODE] tags when posting your code.

    Regards,
    Sarang

  5. #5
    Registered User
    Join Date
    05-28-2014
    Posts
    5

    Re: If Statements: If Multiple Cell (within a range) contains "x" then Return yes/no

    Thank you so much! This is the first time I've used this forum - it was so great to get the help so quickly! Cheers!

  6. #6
    Registered User
    Join Date
    05-28-2014
    Posts
    5

    Re: If Statements: If Multiple Cell (within a range) contains "x" then Return yes/no

    I have one other question - is there a way to do a horizontal look up to return the value where there is only one "yes" into that same column?
    I've attached the workbook again with a new Before and After.

    Thanks again!
    Excel Forum Workbook.xlsx

  7. #7
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: If Statements: If Multiple Cell (within a range) contains "x" then Return yes/no

    May be this......
    Please Login or Register  to view this content.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  8. #8
    Registered User
    Join Date
    05-28-2014
    Posts
    5

    Re: If Statements: If Multiple Cell (within a range) contains "x" then Return yes/no

    Thanks Sktneer - that works for the first problem, but it doesn't return the column heading, just yes or N/A

  9. #9
    Forum Contributor
    Join Date
    06-21-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    191

    Re: If Statements: If Multiple Cell (within a range) contains "x" then Return yes/no

    I do believe the >1 should be =1 for the column heading, then you'd need another if statement for the for the false (which would be the original formula provided).

    You're checking if 1 yes and returning the heading, then you need to check >1 or yes=0.

  10. #10
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: If Statements: If Multiple Cell (within a range) contains "x" then Return yes/no

    See the attached sheet if this is not what you are trying to achieve?
    Attached Files Attached Files

+ 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: 5
    Last Post: 01-23-2014, 11:02 AM
  2. Replies: 3
    Last Post: 04-14-2013, 11:53 PM
  3. Search single row range for multiple texts and return "blah" Excel 2003
    By ashleyd in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-09-2013, 03:36 PM
  4. [SOLVED] Find multiple "text" criteria and return as ""Yes" in Matrix
    By bertrand82 in forum Excel General
    Replies: 11
    Last Post: 04-30-2012, 09:20 AM
  5. Multiple "IF" statements every cell in range
    By cbrd in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-11-2006, 10:25 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