+ Reply to Thread
Results 1 to 8 of 8

Formula to return a date from a table

  1. #1
    Registered User
    Join Date
    02-06-2014
    Location
    Glasgow
    MS-Off Ver
    Excel 2010
    Posts
    3

    Formula to return a date from a table

    I am looking for some assistance with a formula in Excel.

    I have a table which consists of text, numbers and date in each of the columns, which I have set out below.

    Column A Column B Column C
    30/2/13 1000 Yes

    What I am looking to do is to return the date for the corresponding yes appears using VLOOKUP(Yes,A1:C5,1,FALSE)

    However i receive the value #N/A

    Is there an error in the method I am using or is there a better formula to use to return the information that I am looking for.


    Thanks

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Formula to return a date from a table

    Several things wrong with that formula....

    Try =index(a1:a5,match("yes",c1:c5,0))

  3. #3
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Formula to return a date from a table

    I will point out what's wrong with the formula here.

    You're trying to use VLOOKUP alone to perform a "Left Lookup", i.e. return a value that is to the left of the value you're using as the identifier. That doesn't work.
    Even if it did, you'd need to put Yes in quotes as you're looking up a text value.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,852

    Re: Formula to return a date from a table

    Vlookup works on a basis of starting on the left most column for finding the matching value.
    For your situation to work, you would have to have your Yes values in the left most column or employ the Index-Match functions.

    http://www.contextures.com/xlFunctions03.html
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Registered User
    Join Date
    02-06-2014
    Location
    Glasgow
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Formula to return a date from a table

    Thanks for your reply. I have reformatted my table so that the value that I am searching on is on the left hand side. I now get a date returned but it is not the date that corresponds with this entry but is the last date within the table.

    Any ideas?

    I have tried the index and match functions but I am confused on how to use it.

  6. #6
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Formula to return a date from a table

    Could you post some sample data in a workbook and explain which results you expect?

  7. #7
    Registered User
    Join Date
    02-06-2014
    Location
    Glasgow
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Formula to return a date from a table

    I had another go using the formula you gave me for INDEX and MATCH and gives me what I am looking. Thanks for your help this has helped a lot

  8. #8
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Formula to return a date from a table

    No problem. Happy to help.

    If you're satisfied you have a working solution, please mark the thread as solved.

    BSB.

+ 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. Replies: 3
    Last Post: 01-28-2014, 03:10 PM
  2. Replies: 4
    Last Post: 10-05-2012, 03:06 PM
  3. [SOLVED] Return a specific value for a date from a table of date ranges
    By Brit in forum Excel General
    Replies: 3
    Last Post: 07-11-2012, 05:53 AM
  4. Select a Date between Two Date Rows, then the Column State and return Table Matrix Values
    By InNeedofHelpASAP in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-12-2012, 11:03 AM
  5. Replies: 1
    Last Post: 06-30-2010, 04:36 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