+ Reply to Thread
Results 1 to 5 of 5

Lookup based on a date

  1. #1
    Forum Contributor
    Join Date
    11-02-2007
    Location
    Bryne, Norway
    MS-Off Ver
    Microsoft Office Excel 2010
    Posts
    230

    Lookup based on a date

    I have a table with dates and currency-rates. There is only one currency rate per month, but the day can be different since the date is the last working day of the month.

    I want to lookup these rates based on a date where the day can be any day in the month. Any proposals?

    Table example:

    Date Rate
    30.06.2003 7,09320
    31.05.2003 6,70466

    Lookup date: 20.05.2003

    Regards,
    Magne from Norway
    Last edited by mkvassh; 02-20-2009 at 05:31 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Lookup based on a date

    If we assume your data is in A1:B3 (A1:B2 headers) and your lookup value is in say C1 then for the rate:

    [deleted]

    =INDEX($B$2:$B$3,MATCH(C1,$A$2:$A$3,-1))

    There are other ways of course.... assumes criteria will never exceed last working day (ie > fx date for given month)
    Last edited by DonkeyOte; 02-20-2009 at 05:16 AM.

  3. #3
    Forum Contributor
    Join Date
    11-02-2007
    Location
    Bryne, Norway
    MS-Off Ver
    Microsoft Office Excel 2010
    Posts
    230

    Re: Lookup based on a date

    It works. Thank you :-)

  4. #4
    Registered User
    Join Date
    12-16-2006
    Location
    Bangkok
    MS-Off Ver
    Excel 2003
    Posts
    98

    Re: Lookup based on a date

    May I know how does the last parameter -1 in the Match formula works

    =INDEX($B$2:$B$3,MATCH(C1,$A$2:$A$3,-1))
    TIA

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Lookup based on a date

    Check out XL Help on the MATCH function.

+ 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