+ Reply to Thread
Results 1 to 8 of 8

Thread: Result for Last Occurence

  1. #1
    Registered User
    Join Date
    08-21-2010
    Location
    Omaha, NE
    MS-Off Ver
    Excel 2003
    Posts
    40

    Result for Last Occurence

    Hello Excel Forum,

    I've attached an Excel2010 doc with a few columns. I'm trying to find the most recent occurance of a number and the date that corresponds to it.

    Column B counts the number of times that a value repeats in column A. Column C is the information that I am wanting to reference.

    I'm like to use VLOOKUP() or OFFSET()&MATCH() to reference these dates.

    How would I best do this? Thanks for any help!

    Greg
    Attached Files Attached Files
    Last edited by Greg777; 08-10-2011 at 08:50 PM.

  2. #2
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    19,224

    Re: Result for Last Occurance

    Reference them in what way? I don't see a manually mocked up representation of what your desired results would be.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

  3. #3
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636

    Re: Result for Last Occurance

    Try:

    =LOOKUP(2,1/($A$2:$A$5=2),$C$2:$C$5)

    replace 2 with number your are looking for or replace with a cell reference.
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  4. #4
    Registered User
    Join Date
    08-21-2010
    Location
    Omaha, NE
    MS-Off Ver
    Excel 2003
    Posts
    40

    Re: Result for Last Occurance

    Thanks for the request for clarification. I've attached a new doc with more info and an attempt from what was posted.

    Data table is shown in columns A - C.

    I'm wanting to calculate two columns based upon an input column E. I'm able to calculate the resulting date for the first occurance, but have not been able to figure out how to do so for the last occurance.

    It would be OK to use a helper columnif required. I was thinking that some combination of Rank(), Max() may be useful. If a variation on the proposed Vlookup() function will work I'm not able to figure it out.

    A mock-up of the desired results is in column H.

    Thanks for your help!

    Greg

  5. #5
    Registered User
    Join Date
    08-21-2010
    Location
    Omaha, NE
    MS-Off Ver
    Excel 2003
    Posts
    40

    Re: Result for Last Occurence

    attachment for previous
    Attached Files Attached Files

  6. #6
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636

    Re: Result for Last Occurence

    Try:

    =IFERROR(LOOKUP(2,1/($A$2:$A$10=E2),$C$2:$C$10),"")

    copied down
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  7. #7
    Registered User
    Join Date
    08-21-2010
    Location
    Omaha, NE
    MS-Off Ver
    Excel 2003
    Posts
    40

    [Solved] Result for Last Occurence

    Works perfectly. Thanks again for your help. I've attached a completed workbook with the results in column G (in orange) for others' benefit.
    Attached Files Attached Files

  8. #8
    Valued Forum Contributor Haseeb A's Avatar
    Join Date
    05-24-2011
    Location
    India | Kwt
    MS-Off Ver
    2007
    Posts
    1,453

    Re: Result for Last Occurence

    Also,

    =IFERROR(LOOKUP(2,MATCH($A$2:$A$10,E2,0),$C$2:$C$10),"")

    I think this would avoid dividing array like 1/{TRUE,TRUE,FALSE...} & could be more faster...
    HTH; Haseeb

    If your problem is solved, please say so clearly, and mark your thread as Solved:
    Forum Rules & How to Mark a thread as SOLVED

+ 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.2.0