+ Reply to Thread
Results 1 to 3 of 3

Append numberical returned value to cell location

  1. #1
    Registered User
    Join Date
    06-24-2015
    Location
    Cambridge, MA
    MS-Off Ver
    2010
    Posts
    10

    Append numberical returned value to cell location

    Hi All,

    Hopefully this is a simple problem, but I can't seem to find its solution.

    I have a formula:
    =MATCH(D28,Sheet1!A$1:Sheet1!A$200,0)
    that returns a value.
    I'd like to expand the formula to take this value and perform a cell lookup and copy the cells contents. As example, if the returned value is 131, I'd like to reference cell $J131 (in the same formula). The '131' should change with whatever value is returned by the match formula.

    Any help would be much appreciated.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,049

    Re: Append numberical returned value to cell location

    Hi, welcome to the forum

    Match does not exactly return a "value", it returns a position in a range. So if that is returning 131, then it is saying it found your search criteria (the contents of D28) in row 131 - your range starts in row 1.

    If you want to return the contents of a specific colum/row intercept, you need to add INDEX() to that....
    =INDEX(Sheet1!J$1:Sheet1!J$200,MATCH(D28,Sheet1!A$1:Sheet1!A$200,0))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  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: Append numberical returned value to cell location

    Quote Originally Posted by FDibbins View Post
    If you want to return the contents of a specific colum/row intercept, you need to add INDEX() to that....

    =INDEX(Sheet1!J$1:Sheet1!J$200,MATCH(D28,Sheet1!A$1:Sheet1!A$200,0))
    No need to repeat the sheet name:

    =INDEX(Sheet1!J$1:J$200,MATCH(D28,Sheet1!A$1:A$200,0))

    The MATCH function returns the RELATIVE position of the lookup value within the lookup array.

    Consider this example...

    Data Range
    A
    B
    C
    D
    9
    Value
    Lookup
    54
    10
    5
    Location
    6
    11
    23
    ------
    ------
    ------
    12
    29
    13
    41
    14
    43
    15
    54
    16
    60
    17
    71
    18
    74
    19
    91
    20
    95


    This formula entered in D10:

    =MATCH(D9,A10:A20,0)

    MATCH returns 6 because the lookup value 54 is found at the 6th position RELATIVE to the lookup array (range A10:A20).
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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. Trying to updated sheet based of location returned by Vlookup
    By mds219 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 01-06-2014, 12:43 AM
  2. Replies: 2
    Last Post: 09-23-2013, 07:24 PM
  3. [SOLVED] Result in cell based on cell on another tab in numberical order
    By jgregory43 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-02-2013, 06:52 PM
  4. [SOLVED] Copy numberical result (cell C5) to another cell (E5) as text value
    By Rocky2013 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-22-2013, 09:00 PM
  5. [SOLVED] [Help]macro to open file browser, to select a location, and save the location to a cell
    By zhuleijia in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-06-2013, 09:56 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