• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Last occurrence in range

staroslav

New Member
How do I locate the latest date an item (name) had been listed in a range?

[pre]
Code:
eg:
A     |   B   |   C
1 Date     | Name1 | Name2 ...
2 01/01/12 | item1 |
3 01/03/12 |       | item1
4 01/06/12 |       |
[/pre]
What is the formula that will search for item1 and give me 01/03/12?

Thanks! Tried to play around with vlookup and max, but my excel knowledge is very limited...
 
I think index and match functions are needed here, but so far can't make it work. Anybody? this shouldn't be too difficult...

Thanks!
 
Hello Krishnakumar!

Thank you for your response. I get a #VALUE! error. Some cells in range don't have data, is that the problem?

My formula looks this way at present (working in mac office excel):


=INDEX(A2:A54;MAX(IF(srange=B72;ROW(A2:A54)-ROW(A2)+1)))


where srange is a named range I use; B72 contains (item1) what I am looking for...
 
Staroslav


When you entered the formula you need to press Ctrl+Shift+Enter not Enter
 
Thank you very much! Found that this formula also works =SUMPRODUCT(MAX((A2:A54)*(srange=B71)))

Again, THANK YOU!
 
Hi Staroslav,


As you are the questionnaire, then its depend upto you that, what you define as "last Occerence"..

as per you answer "Last Occurance" is Max Date,

but Krishna's Formula gives you "Last Occurance" in "Column A" :)


still, glad you solved it..


PS:

Just to reduce the length of your formula and giving credit to Krishna's Formula.. :)

Code:
{=MAX(IF(srange=B71,A2:A54))}

you need to press Ctrl+Shift+Enter not just Enter

Regards,

Deb
 
Back
Top