+ Reply to Thread
Results 1 to 3 of 3

date matching issue

Hybrid View

  1. #1
    Registered User
    Join Date
    09-29-2009
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2003
    Posts
    5

    date matching issue

    Hi, I have 2 columns of data. Column A with dates and Column B with values. I have the same column B values in another sheet and I would like to return the matching date to the value. The problem is that some of the values are identical and they are only matching the first date that is found rather then all subsequent dates. Below is an example of what I mean however note that with the real date I'm working with, there are over 200 values with multiple values being the same - ie. I have lots of occurances of 5.8, lots of 6.3 etc.

    Column A Column B
    30-Jun-98 7.0
    31-Dec-99 6.5
    31-Jan-00 7.0
    31-Mar-01 6.1

    The result I keep getting when using an INDEX/MATCH formula is that for all cells containing value 7.0, only date 30-Jun-98 is returned. Is there a formula that we can write that will say "if 30-Jun-98 has already been returned, then find the next corresponding date to value 7.0"?

    If anyone can shed any light on this I'd really appreciate it.

    Thanks heaps.

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

    Re: date matching issue

    I have the same column B values in another sheet and I would like to return the matching date to the value
    If the table are the same why not link the sheets ?

    I can only presume the above is not viable because the ordering of the values in Col B on Sheet2 is not the same as on Sheet1 ?

    If that is indeed the case then if we assume

    Sheet1!A1:B300 contain original values (Col A being Dates and B being values)

    Sheet2!B1:B300 contain same values as Sheet1!B1:B300 but in different order

    Then...

    First I would insert a header row into Sheet2 such that A1:B1 is moved to A2:B2 and A1:B1 is blank.

    Then...

    Is there a formula that we can write that will say "if 30-Jun-98 has already been returned, then find the next corresponding date to value 7.0"?
    A2: 
    =INDEX(Sheet1!$A$1:$A$300,MATCH(1,INDEX((Sheet1!$B$1:$B$300=$B2)*ISNA(MATCH(Sheet1!$A$1:$A$300,$A$1:$A1,0)),0),0))
    copied down to A301

  3. #3
    Registered User
    Join Date
    09-29-2009
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2003
    Posts
    5

    Smile Re: date matching issue

    That formula works a treat! Thanks so much, really appreciate your help!

+ 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