+ Reply to Thread
Results 1 to 6 of 6

Search and return

  1. #1
    Registered User
    Join Date
    05-06-2016
    Location
    Copenhagen, Denmark
    MS-Off Ver
    MS 2013
    Posts
    27

    Search and return

    Hi,

    I would like to know how to search for a cell whose value matches that of another cell and get the cell that is "x" cells above or below that cell. I have uploaded an Excel-document with animals as the example. Could anyone help me do this?

    Kind regards
    Kasper
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Search and return

    In Cell B2:
    Please Login or Register  to view this content.
    In cell B4:
    Please Login or Register  to view this content.
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,908

    Re: Search and return

    Try this in B2:

    =INDEX(Animal!$A$2:$A$16,MATCH(B1,Animal!$A$1:$A$15,0))

    Copy down.

  4. #4
    Registered User
    Join Date
    05-06-2016
    Location
    Copenhagen, Denmark
    MS-Off Ver
    MS 2013
    Posts
    27

    Re: Search and return

    Thanks a lot!

  5. #5
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Search and return

    Quote Originally Posted by Phuocam View Post
    Try this in B2:

    =INDEX(Animal!$A$2:$A$16,MATCH(B1,Animal!$A$1:$A$15,0))

    Copy down.
    The formula only works for B2, not B4, as the match brings back the same number no matter what row the formula is in.

  6. #6
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Search and return

    Enter formula in B2 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B
    1 Animal: Cow
    2 Animal in the cell below that: Fish
    3
    4 Animal three cells below that: Snake
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

+ 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. Search a table with multiple search inputs and return all matches
    By JDI in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-16-2014, 12:23 PM
  2. Formula to search, match value, search again, return SUM
    By Russ Fuquay in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-26-2013, 11:01 PM
  3. how to use VBA to search and return search result in the user form
    By pearlynie in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-25-2013, 07:58 AM
  4. Replies: 4
    Last Post: 12-21-2012, 10:35 AM
  5. Search...Return...give info based on the return address
    By deek1004 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-11-2012, 03:36 PM
  6. Replies: 1
    Last Post: 01-25-2011, 10:50 PM
  7. Replies: 0
    Last Post: 11-05-2009, 04:47 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