• 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.

Return second last matching column value

Psylence

New Member
Hi all, following is the table I am working on.

No Name Code Date Amount
1 ABC T56U 42795 1000
2 DEF SK7 42796 3500
3 GHI SK7 42797 9847
4 JKL 34TY 42798 6254
5 MNO TR09 42799 8000
6 PQR SK7 42800 9400
7 STU TYPL 42801 10000
8 VWX SK7 42802 6000
9 YZ 34TY 42803 3170

I'd like to search for the second last instance of SK7 in the Code column and retrieve the corresponding value in the amount column. In this example the second last SK7 is row 6 with an amount of 9400.

Is there any way of doing this without going into VB please?

Thanks!
 
AGGREGATE is a very fantastic fn but in case you have xl 2007 then you may try this one.

=INDEX($E$1:$E$10,INDEX(LARGE(($C$1:$C$10=G3)*ROW($C$1:$C$10),2),,))
 
Back
Top