+ Reply to Thread
Results 1 to 6 of 6

Urgent Help: Find if any of the two values is included in a range of cell

  1. #1
    Registered User
    Join Date
    09-23-2012
    Location
    Mumbai
    MS-Off Ver
    Excel 2010
    Posts
    61

    Urgent Help: Find if any of the two values is included in a range of cell

    I want to know the formula to find if any of the two values is included in a range of cell.

    Example, below is a group of names (similarly I have various other groups with different names):

    Column A
    1. Andy
    2. Susan
    3. Greg
    4. George
    5. Peter
    6. Craig


    If the above group (range A1:A6) includes SUSAN OR ANDY then it must return the value as 'TRUE'

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Urgent Help: Find if any of the two values is included in a range of cell

    hi faizzsheikh. try:
    =SUM(COUNTIF(A1:A6,{"Susan","Andy"}))>0

    or if you want it to be finding names that contains those 2,
    =SUM(COUNTIF(A1:A6,{"*Susan*","*Andy*"}))>0

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Urgent Help: Find if any of the two values is included in a range of cell

    Here's another way using cells to hold the criteria.

    Data Range
    A
    B
    C
    D
    1
    Andy
    -----
    Susan
    TRUE
    2
    Susan
    Andy
    3
    Greg
    4
    George
    5
    Peter
    6
    Craig

    This formula entered in D1:

    =SUMPRODUCT(COUNTIF(A1:A6,C1:C2))>0
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    09-23-2012
    Location
    Mumbai
    MS-Off Ver
    Excel 2010
    Posts
    61

    Re: Urgent Help: Find if any of the two values is included in a range of cell

    @benishiryo - Thanks a lot for your help! So Glad! both your formulas worked

    @benishiryo - Thanks a lot to you too, yours also worked well

    Thanks guys... this forum is amazing.
    I eagerly wish to contribute to this forum but I myself is a rookie with advance excel, formulas & VBA

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Urgent Help: Find if any of the two values is included in a range of cell

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  6. #6
    Registered User
    Join Date
    09-23-2012
    Location
    Mumbai
    MS-Off Ver
    Excel 2010
    Posts
    61

    Re: Urgent Help: Find if any of the two values is included in a range of cell

    @arlu1201

    Thanks a lot for the valuable instructions

+ 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: 13
    Last Post: 07-07-2013, 10:40 AM
  2. [SOLVED] Somewhat Urgent: Find all matching values and output the corresponding cells
    By Morrigan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-24-2013, 10:29 PM
  3. How to set a range of values to be identified? (Pics included)
    By Brookshire in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-20-2013, 08:54 PM
  4. [SOLVED] URGENT find common string values in 2 colums
    By M.Karim in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-13-2012, 11:21 AM
  5. Replies: 5
    Last Post: 03-15-2006, 02:55 PM

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