+ Reply to Thread
Results 1 to 8 of 8

Lookup Dates from two seperate data sets and return corresponding value in accending order

  1. #1
    Registered User
    Join Date
    11-06-2012
    Location
    Norfolk, VA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Lookup Dates from two seperate data sets and return corresponding value in accending order

    I've been stuck on this problem for a while now, and I'm not sure if it is something that can actually be done or not. What I need to do is lookup a value (from a data validation drop down box) in two seperate locations, and if there: return the lowest corresponding value, then the next corresponding value, then the next, etc... until there are no values left in either of the locations. The problem I am having most with this formula is the ability to search both locations at the same time and having it check back and forth for the lowest value until there are no more. Anyone know if this is possible to do? I can provide a sample if necessary.

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Lookup Dates from two seperate data sets and return corresponding value in accending o

    Hi rgrov,

    See the attached file where I have used below formula:-

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Enter with ctrl shift enter key combination


    see attached values in ascending order from two locations.xlsx


    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Registered User
    Join Date
    11-06-2012
    Location
    Norfolk, VA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Lookup Dates from two seperate data sets and return corresponding value in accending o

    Thanks a ton Dilipandey, thats almost exactly what I needed. One more question though, can that formula still work if the two sets of values are located in seperate worksheets? I.E. there are 3 worksheets total: one for the values that are being looked up (colums E & F), one for the first set of data B1:B8, and one for the second set of data H1:H8

    Thanks, Rob

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Lookup Dates from two seperate data sets and return corresponding value in accending o

    yes... formula will work.
    You just need to change the reference .. for example A1:A5 of this workbook can become Sheet4!A1:A5 in formula if you need to include A1:A5 from sheet 4

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  5. #5
    Registered User
    Join Date
    11-06-2012
    Location
    Norfolk, VA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Lookup Dates from two seperate data sets and return corresponding value in accending o

    I tried that and could not get it to work. Here is what I did with the sample you provided.

  6. #6
    Registered User
    Join Date
    11-06-2012
    Location
    Norfolk, VA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Lookup Dates from two seperate data sets and return corresponding value in accending o

    I've tried tweaking the formula provided in your sample workbook to work when checking multiple worksheets, but still can't get it to work. I believe the problem is with the logic section of the IF Formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    When you highlight the logic section (ISNUMBER function) of the formula and press F9 it returns FALSE, even though there are numbers there. Subsequently in the TRUE section of the IF function when you highlight it and press F9 it returns #VALUE. Is there something that can be done with this formula to make the ISNUMBER function check multiple worksheets for the numbers. I am assuming that is the reason I'm not getting the correct results from the formula, and if its not the reason what can be done to get the desired results?

  7. #7
    Registered User
    Join Date
    11-06-2012
    Location
    Norfolk, VA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Lookup Dates from two seperate data sets and return corresponding value in accending o

    Bump No Response

  8. #8
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Lookup Dates from two seperate data sets and return corresponding value in accending o

    Try this "array formula" in F11 and copied down

    =IFERROR(SMALL(IF({1,0},IF(Sheet3!A$1:A$8=E$11,Sheet3!B$1:B$8),IF(Sheet2!H$1:H$8=E$11,Sheet2!I$1:I$8)),ROWS(F$11:F11)),"")

    The ranges in sheet2 and sheet3 must be the same size for this to work
    Audere est facere

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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