+ Reply to Thread
Results 1 to 4 of 4

convert cell address to corresponding cell

  1. #1
    Registered User
    Join Date
    12-17-2008
    Location
    New York
    Posts
    2

    convert cell address to corresponding cell

    I have two columns in my worksheet that represent a graph: the A column has x values and the B column has y values. I want to be able to find the x value that corresponds to the max y value.

    I am currently using:
    =CELL("address",INDEX(B1:B2005,MATCH(MAX(B1:B2005),B1:B2005,0)))

    This function gives me the cell location of the y max, but is there a way to convert this to the corresponding x location?

    For example, if the above function outputs $B$1569, I want to know what the value of $A$1569 is.

    Thanks for your help!
    Last edited by dexchu2; 12-17-2008 at 11:20 PM. Reason: Solved

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372
    Hi

    if your output is a cell address, you can use a combination of INDIRECT() and OFFSET() to get the value in a neighbouring cell. If the output of your function is in cell A1, use something like

    =OFFSET(INDIRECT(A1),0,-1)

    The INDIRECT function will take the value in A1 and interpret it as a cell reference, which the offset function uses to lookup the value in the same row and one column to the left.

    HTH

  3. #3
    Registered User
    Join Date
    12-17-2008
    Location
    New York
    Posts
    2
    Awesome! Thanks a lot.

  4. #4
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372
    Actually, the following should also work. Since you're already using the Index/Match combination to figure out the location of the maximum value, you can use almost the same formula to return the value in column A. Just adjust the range for the index like so:

    =INDEX(A1:B2005,MATCH(MAX(B1:B2005),B1:B2005,0),1)

+ 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