+ Reply to Thread
Results 1 to 3 of 3

Searching for a value within a subset of a table

  1. #1
    Registered User
    Join Date
    04-27-2013
    Location
    Boston, MA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Searching for a value within a subset of a table

    Is it possible in Excel 2007 to look for a value in column A, then look through column B, for a certain value as long as column A matches the original lookup value?

    Here is an example to illustrate what I'm trying to do.

    Column A contains fruit and Column B contains either a "1" or a "0".
    If my lookup value for Column A is "apple", I want to search Column B for a "1" in all rows where Column A = "apple". If it finds a "1", the search can end and the result should be "1"; if it doesn't find a "1", the result should be "0".

    I tried the lookup function but it kicks out as soon as it finds a match in Column A. Sometimes it returns the "1" and sometimes it returns "0". I need to know if any of the apples has a "1" in it.

    Worksheet contents:
    apple 0
    apple 1
    apple 0
    apple 0
    apple 0
    orange 0
    orange 0
    orange 0
    pear 0
    pear 0
    pear 0
    pear 0
    pear 1

    Results I'm looking for:
    apple 1
    orange 0
    pear 1

  2. #2
    Registered User
    Join Date
    04-18-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Searching for a value within a subset of a table

    Maybe a simple SUMIF could work..
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Pray tell, what dost thou desire to do?

  3. #3
    Registered User
    Join Date
    04-27-2013
    Location
    Boston, MA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Searching for a value within a subset of a table

    Quote Originally Posted by pawtech View Post
    Maybe a simple SUMIF could work..
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    That does work! Thank you! I was so focused on the "lookup" function that I didn't consider a "sum" function.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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