+ Reply to Thread
Results 1 to 9 of 9

Index, match, duplicates in array - how to pick up the last/bottom line

  1. #1
    Forum Contributor
    Join Date
    01-29-2011
    Location
    Bristol, England
    MS-Off Ver
    Excel 2003
    Posts
    471

    Index, match, duplicates in array - how to pick up the last/bottom line

    Hi
    I have tried to find solution for my problem but so far no luck. My formula with defined names is this

    =INDEX(zflexSTATdelDte,MATCH(KHL_AUK_ID,zflexAUKid,0))

    If in array there are duplicates it always picks up the first line. Its great as thats what I need. But now I need exactly the same formula but now I would like it to pick up the last line from array. That is if there are duplicates.
    Can someone advise me how to change the formula. I will give an example

    ---zflexAUKid------------zflexSTATdelDte
    180081418310------------ 14/04/2011
    180081418410------------ 11/04/2011
    180083049910------------ 01/03/2011
    180083049910------------ 01/03/2011
    180083049910------------ 01/04/2011
    180083066010------------ 29/03/2011
    180083064710------------ 09/04/2011

    So as you can see in array column there are x3 duplicates highlighted in red. Current formula picks up the date in green. The new formula that I'm after should pick up the date in blue.


    Any ideas?

    Kind regards,
    Rain


    So if in array zflexAUK there are some duplicates

  2. #2
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Index, match, duplicates in array - how to pick up the last/bottom line

    rain4u,

    Try changing the 0 to a 1.


    =INDEX(zflexSTATdelDte,MATCH(KHL_AUK_ID,zflexAUKid,1))
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  3. #3
    Forum Contributor
    Join Date
    01-29-2011
    Location
    Bristol, England
    MS-Off Ver
    Excel 2003
    Posts
    471

    Re: Index, match, duplicates in array - how to pick up the last/bottom line

    Doing this will cause problems when there is now match. Instead of saying #N/A it picks up a one random date and then uses it everywhere where it should be #N/A.
    The dates it does pick up are wrong as well.

    Any other ideas?

  4. #4
    Valued Forum Contributor scottylad2's Avatar
    Join Date
    09-03-2010
    Location
    edinburgh
    MS-Off Ver
    Office 2007 Prof & Office 2010 Student Edition
    Posts
    629

    Re: Index, match, duplicates in array - how to pick up the last/bottom line

    will it always be the earliest date you require?
    Windows 7 using Office 2007 & 2010

    Remember your [ code ] [ /code ] tags, makes reading soooo much easier

  5. #5
    Forum Contributor
    Join Date
    01-29-2011
    Location
    Bristol, England
    MS-Off Ver
    Excel 2003
    Posts
    471

    Re: Index, match, duplicates in array - how to pick up the last/bottom line

    If there are duplicate cells in array column then the bottom line always has the latest date in the index column. By that I mean that the last line has always date furthest into the the calender year i.e. the dates for these duplicate lines in index column are in ascending order. The date may be either in past or or future.

    I hope this helps.

  6. #6
    Forum Contributor
    Join Date
    01-29-2011
    Location
    Bristol, England
    MS-Off Ver
    Excel 2003
    Posts
    471

    Re: Index, match, duplicates in array - how to pick up the last/bottom line

    *bump*bump*

  7. #7
    Forum Contributor
    Join Date
    01-29-2011
    Location
    Bristol, England
    MS-Off Ver
    Excel 2003
    Posts
    471

    Re: Index, match, duplicates in array - how to pick up the last/bottom line

    *bump*bump*

  8. #8
    Forum Contributor
    Join Date
    01-29-2011
    Location
    Bristol, England
    MS-Off Ver
    Excel 2003
    Posts
    471

    Re: Index, match, duplicates in array - how to pick up the last/bottom line

    *bump*bump*

  9. #9
    Forum Contributor
    Join Date
    01-29-2011
    Location
    Bristol, England
    MS-Off Ver
    Excel 2003
    Posts
    471

    Re: Index, match, duplicates in array - how to pick up the last/bottom line

    bump*anyone?

+ 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