+ Reply to Thread
Results 1 to 11 of 11

Search in Mulitple Columns and Return Corresponding Column/Row Result

  1. #1
    Registered User
    Join Date
    01-10-2008
    Posts
    24

    Search in Mulitple Columns and Return Corresponding Column/Row Result

    Hello,

    I'm hope there is a simple solution.

    Basically, I need to look for an item, lets use "apple" as an example, in a range of cells, A1:D100. Then the corresponding result would be in another column in the same row.

    I hope this makes sense.

    Thanks!

  2. #2
    Registered User
    Join Date
    04-01-2008
    Posts
    4
    How many times is apples going to appear in your set of data? Is it random?

    What exactly are your trying to get out of your range? How many apples sold, who sold them etc?


  3. #3
    Valued Forum Contributor Dunc3142's Avatar
    Join Date
    09-05-2007
    Location
    Franklin OH
    MS-Off Ver
    2000 and 2007 and 2010 @ Home & Teach 2010
    Posts
    351

    More info

    What do you want it to display, a count of apple(s) or just highlight the cells that have apple in them??
    Attached Files Attached Files
    Yes it will. we just have to figure out how...
    If I have helped you, PLEASE click the * and add to my Rep.
    Also, if the problem is SOLVED please mark it as so.

  4. #4
    Registered User
    Join Date
    01-10-2008
    Posts
    24
    Hi Royals2008 and Dunc3142,

    The "Apple" will be a unique record within the range. Once it finds it in the range it will refer to another column on the same row as the "Apple" and provide me with that result.

    I've attached a spreadsheet with what I am trying to accomplish.

    Thanks!
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474
    Assuming that any item is unique to each row, try...

    H5, confirmed with CONTROL+SHIFT+ENTER, and copied down:

    =SUM(IF($A$5:$B$8=G5,$D$5:$D$8))

    Hope this helps!

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    This should do it too, with only using ENTER....

    =SUMPRODUCT(($A$5:$B$8=G5)*($D$5:$D$8))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  7. #7
    Registered User
    Join Date
    01-10-2008
    Posts
    24
    HI Dominic and NBVC,

    Thanks! Those two solutions work, however, how can the formula be changed to addess cells with a combination of letters and number or a non numeric entry?

  8. #8
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474
    Quote Originally Posted by JLRO
    HI Dominic and NBVC,

    Thanks! Those two solutions work, however, how can the formula be changed to addess cells with a combination of letters and number or a non numeric entry?
    Can you provide a small sample of the data, along with the expected result?

  9. #9
    Registered User
    Join Date
    01-10-2008
    Posts
    24
    Hi Dominic,

    Here is the example.
    Attached Files Attached Files

  10. #10
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try, in H5, copied down:

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    01-10-2008
    Posts
    24

    Thank You!

    Hello NBVC,

    Thank you for the solution and quick reponse!

    Have a great week.

+ 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