+ Reply to Thread
Results 1 to 4 of 4

Get data from adjacent cells

  1. #1
    Registered User
    Join Date
    08-17-2015
    Location
    Europe
    MS-Off Ver
    2010
    Posts
    5

    Get data from adjacent cells

    Last rusty question for the evening.

    In Cell F17 I have the following which selects the closest match from a series of 3 cells - which is great - does exactly what I need it to do.

    =INDEX(F14:F16,MATCH(MIN(ABS(F14:F16-F7)),ABS(F14:F16-F7),0))

    Next, I need the data from the adjacent cell to the left of the closest match to be displayed in cell, lets say F18.

    How can I do this? The data in the adjecent cells to the left of F14:F16 is a number.

    Thanks, PB.

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Get data from adjacent cells

    Hi,
    you say you want the cell to the left of the closest match. it should be E14 or E15 or E16. Not F18. Or there is something I don't understand.
    If you want the cell to the left of the closest match, you just have to change the first range if your Index function to E14:E16.
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  3. #3
    Registered User
    Join Date
    08-17-2015
    Location
    Europe
    MS-Off Ver
    2010
    Posts
    5
    Quote Originally Posted by p24leclerc View Post
    Hi,
    you say you want the cell to the left of the closest match. it should be E14 or E15 or E16. Not F18. Or there is something I don't understand.
    If you want the cell to the left of the closest match, you just have to change the first range if your Index function to E14:E16.
    Hi, sorry, I may have explained badly.

    Let me try again:

    In cell F20, I want to display the value of that contained in the adjacent cell to the left of the cell that contains the closest match calculated by F19 which is: =INDEX(F14:F16,MATCH(MIN(ABS(F14:F16-F7)),ABS(F14:F16-F7),0))

    So, one of the cells E14:E16 has the value that I want, I just don't know how/if I can get it based on the fact that it will be directly to the left of the cell that is the closest match found by the formula in F19.

    Thanks, PB.

  4. #4
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Get data from adjacent cells

    try this formula in cell F20.
    It is the match the find the closest match. The Index function is used to return a specific cell based on the match result.
    Please Login or Register  to view this content.

+ 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] Cut parts of data in cell with var delimiters to separate cells and copying adjacent data
    By Noah14 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-26-2015, 11:28 AM
  2. [SOLVED] Trying to add data to cells based on criteria from adjacent cells
    By JohnnyBoyxxx in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-27-2015, 02:46 PM
  3. [SOLVED] Highlighting Cells if Specific Data Appears in Adjacent Cells
    By vinceancona in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-18-2014, 06:33 PM
  4. Average cells based on data in adjacent cells.....Again
    By dwright1020 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-26-2013, 08:06 AM
  5. Average cells based on data in adjacent cells.
    By dwright1020 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-25-2013, 01:22 PM
  6. Replies: 3
    Last Post: 07-30-2012, 11:20 AM
  7. Link adjacent cells to data connection cells
    By keepitfrozen in forum Excel General
    Replies: 0
    Last Post: 08-07-2009, 04:49 PM

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