+ Reply to Thread
Results 1 to 5 of 5

return a value in a range if cell has date that fall between two dates

  1. #1
    Forum Contributor
    Join Date
    12-21-2011
    Location
    MS, USA
    MS-Off Ver
    Excel 2013
    Posts
    119

    return a value in a range if cell has date that fall between two dates

    I want to be able to return a value within a range where the vlookup works if a cell has a date that fall between two dates. for instance:
    Column A has start date of year( jan 1st 2001) Column B has end date of the yar (dec 31, 2001) each row are the same except it goes down to year 2013. Now the Column C has the value that I want to return from the specified row, if a date in cell D1 contains the date that fall between these two dates in column a and b. I have found alot of solutions but those solutions only tells me if it is true or false or if you type text value in the "". Any assistance is greatly 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
    52,926

    Re: return a value in a range if cell has date that fall between two dates

    Its a lot easier to find solutions if you have some sampel data to play with (well, for me it is, anyway)

    i would suggest you upload a sample work book, (all sensitive data removed), showing what data you are working with, a few examples of what your expected outcome is, and how you arrived at that
    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 Contributor
    Join Date
    12-21-2011
    Location
    MS, USA
    MS-Off Ver
    Excel 2013
    Posts
    119

    Re: return a value in a range if cell has date that fall between two dates

    Example.xlsx

    see attached. I hope I was able to attach a sheet.

  4. #4
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: return a value in a range if cell has date that fall between two dates

    As long as your dates are sorted in ascending order, as you now have it, this should work:

    =INDEX($D$2:$D$14,MATCH(G14,$B$2:$B$14,1))
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  5. #5
    Forum Contributor
    Join Date
    12-21-2011
    Location
    MS, USA
    MS-Off Ver
    Excel 2013
    Posts
    119

    Re: return a value in a range if cell has date that fall between two dates

    Thank you!This really works! Awesome!

+ 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