+ Reply to Thread
Results 1 to 9 of 9

Find cell value in range, return adjacent value

  1. #1
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Oshawa
    MS-Off Ver
    Excel 2010
    Posts
    660

    Find cell value in range, return adjacent value

    Hi everyone,

    I'm going to try this one using excel formulas. Here's what I'm working with:

    1. Cell A1 contains a value like 12345
    2. Range A2:Z2500 contains similar values including value A1
    3. Final A1 in A2:Z2500, then return the value to the right of it

    For example

    Within range A2:Z2500, if cell W1562 contains value 12345 (as found in A1), then return the value in X1562.

    Any ideas?

    Thanks!!

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,055

    Re: Find cell value in range, return adjacent value

    try this amend the ranges to suit your data):

    =VLOOKUP(A1,$A$2:$B$12,2,FALSE)
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Oshawa
    MS-Off Ver
    Excel 2010
    Posts
    660

    Re: Find cell value in range, return adjacent value

    hi Glen,

    That formula is assuming the lookup value is located in column A. It could be anywhere in the range A2:Z2500. It could be in column L, therefor the value directly to the right would be returned.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,055

    Re: Find cell value in range, return adjacent value

    I missed the A:Z bit. try this, then...

    =INDEX($A$2:$G$12,SUMPRODUCT(--($A$2:$G$12=$A$1)*ROW($A$2:$G$12))-ROW(A2)+1,SUMPRODUCT(--($A$2:$G$12=$A$1)*COLUMN($A$2:$G$12))+1)
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Oshawa
    MS-Off Ver
    Excel 2010
    Posts
    660

    Re: Find cell value in range, return adjacent value

    Thanks very much, Glenn. It see it works perfectly on your workbook but I'm getting a #Ref error. Does this formula only work if the data and results are on the same sheet perhaps?

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,055

    Re: Find cell value in range, return adjacent value

    You didn't say that the results were on a different sheet!! How am I supposed to know that?? I have assumed that the 12345 is on the same sheet as the grid. Is it??
    Attached Files Attached Files
    Last edited by Glenn Kennedy; 03-30-2017 at 02:43 PM.

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,055

    Re: Find cell value in range, return adjacent value

    If not, then use this.

    =INDEX(Sheet1!$A$2:$G$12,SUMPRODUCT(--(Sheet1!$A$2:$G$12=$A$1)*ROW(Sheet1!$A$2:$G$12))-ROW(Sheet1!A2)+1,SUMPRODUCT(--(Sheet1!$A$2:$G$12=$A$1)*COLUMN(Sheet1!$A$2:$G$12))+1)
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Oshawa
    MS-Off Ver
    Excel 2010
    Posts
    660

    Re: Find cell value in range, return adjacent value

    Hi Glenn,

    You are absolutely right, I didn't mentioned though I should have. I have tried your new format and there's one item that's throwing it off. In your formula:

    Please Login or Register  to view this content.
    cell
    Please Login or Register  to view this content.
    is actually located in Sheet2. I've tried just moving that cell reference to Sheet2 but I get an error. When it stays in Sheet1 it works perfect.

    Apologies for not being clear enough on the sheet details.

    Any ideas?

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,055

    Re: Find cell value in range, return adjacent value

    see post 7

+ 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. [SOLVED] How to find value >0 and return content of adjacent cell...
    By jmufes in forum Excel General
    Replies: 6
    Last Post: 03-06-2021, 02:24 AM
  2. Find value in range, return value from left adjacent cell
    By lukestkd in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-28-2016, 06:01 AM
  3. Find smallest value in range and return adjacent values
    By bunchie3174 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-24-2016, 06:09 AM
  4. Replies: 3
    Last Post: 07-21-2015, 05:10 PM
  5. Find specific value in Row, Return Text from Adjacent Cell
    By oneforfive in forum Excel General
    Replies: 5
    Last Post: 07-21-2015, 03:57 PM
  6. Find Value in index and return adjacent cell
    By t2tommy in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-09-2013, 01:22 PM
  7. [SOLVED] Find text in a column or range and return value of adjacent cell
    By chemoul in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-20-2012, 04:30 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