+ Reply to Thread
Results 1 to 6 of 6

Search for Value and Return a date from another cell in same column

  1. #1
    Registered User
    Join Date
    09-11-2013
    Location
    Kansas
    MS-Off Ver
    Excel 2007, 2010 & 2013
    Posts
    17

    Search for Value and Return a date from another cell in same column

    1st post and this one is a doozy, least for me it has been.
    I have a simple spreadsheet (see picture). I would like to search for a
    number value (V66) in a range of cells (J15:AF15) and based on the cell
    returned (X15) return the date for that column (X8) and have that date show in
    (V68)
    The closest I could get, and it is not proper or correct is using HLOOKUP in cell (V68)
    like this:

    =HLOOKUP(V66,J8:AF15,1,FALSE)

    I have tried various combinations of LOOKUP, VLOOKUP, HLOOKUP, MIN, MAX, DATE and
    a whole slew of other functions until I am stuck in a circular reference myself now.

    Any help would be greatly appreciated, thanks,
    Ray

    Find Date of Specified Value.jpg

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Search for Value and Return a date from another cell in same column

    =index(i8:af8,0,match(max(i15:AF15),i15:af15,0))

    Formula Logic:

    INDEX(RETURN VALUE FROM WHAT TABLE,WHAT ROW, WHAT COLUMN)

    MATCH(MATCH WHAT, WHERE, False)

    MAX(I15:AF15) = 246.99

    MATCH(246.99,I15:AF15,0) = 16th value

    INDEX(I8:AF8,0,16) = May-13

    You may have to reformat V68 to Month-Date.

    If it doesn't work, try entering it as an array using Ctrl+Shift+Enter. I can't test it without recreating your entire workbook from scratch.
    Last edited by daffodil11; 09-11-2013 at 12:34 PM.

  3. #3
    Registered User
    Join Date
    09-11-2013
    Location
    Kansas
    MS-Off Ver
    Excel 2007, 2010 & 2013
    Posts
    17

    Re: Search for Value and Return a date from another cell in same column

    You sir are a genius! Thank you, it worked like a charm (as an array).

    I could follow along with the formula as you wrote it with the exception
    of references to the 16th value...I think.

    MATCH(246.99,I15:AF15,0) = 16th value in from I15
    Takes that value and then points at the 16th in on the '8' row = May-13?

    Thank you,
    Ray

  4. #4
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Search for Value and Return a date from another cell in same column

    Index(range,rows,columns)

    We aren't using any row change, so we leave that at zero. We are however looking for which column 246.99 occurs in.

    Match(246.99,I15:AF15,0) = 16, because it happens 16 columns over from I15.

    So index is pulling the 16th value in I8:AF8.

    Index/Match has a lot of applications, especially for reorganizing data.

    When used in conjunction with RANK, you can use it to pull top X values from a table by simple matching the rank.

  5. #5
    Registered User
    Join Date
    09-11-2013
    Location
    Kansas
    MS-Off Ver
    Excel 2007, 2010 & 2013
    Posts
    17

    Re: Search for Value and Return a date from another cell in same column

    Almost had it
    I do understand now and will keep your reply as a handy reference.

    Thank you again,
    Ray

  6. #6
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Search for Value and Return a date from another cell in same column

    Glad I could help out.

    Here's a few examples that further illustrate it's uses.

    indexmatch for RPM.xlsx

    Here's an example of the 2nd tab pulling the Top 5 matches of each 'Priority' broken out by 'Division.'

    top 5 autosort - revised.xlsx
    Last edited by daffodil11; 09-11-2013 at 02:26 PM.

+ 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] Formula to search a column for a specific value, and return the value in the next cell
    By TimothyD in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-26-2013, 12:02 AM
  2. [SOLVED] Search Column for text, Return Cell below to another sheet?
    By Dewy1425 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-01-2012, 08:07 PM
  3. Search column for name and return the value in the cell to the right of it.
    By walker313 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-14-2012, 01:03 PM
  4. Replies: 4
    Last Post: 06-07-2009, 10:55 AM
  5. find name; search column; if date found-return 3 data pts; move to next row
    By cdl in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-28-2008, 10:43 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