Return Latest or Earliest

robocop1906

Board Regular
Joined
Jan 15, 2003
Messages
143
I’d like to do a lookup on column A and return the highest number so per the example below (lookup of STT would return “2”)

Then I’d like a separate formula that used the same criteria but instead of returning what’s in column B, I’d like to return what’s in column C so per the below example it would be (lookup STT and return Lion)


Column A

STT
STT
TT
TP
TP

Column B
1
2
-3
-3
5

Column C
Tiger
Lion
Bear
Cat
Dog
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

jim may

Well-known Member
Joined
Jul 4, 2004
Messages
7,484
Maybe...(???)
Excel Workbook
ABCDEF
1STT1TigerLion
2STT2Lion
3TT-3Bear
4TP-3Cat
5TP5Dog
Sheet1
Excel 2007
Cell Formulas
RangeFormula
F1=INDEX(C1:C5,MAX(COUNTIF(A1:A5,A1:A5)))
 

robocop1906

Board Regular
Joined
Jan 15, 2003
Messages
143
That worked for the example given but if you resort the data and say have TP in the middle of STT it does not work
 

jim may

Well-known Member
Joined
Jul 4, 2004
Messages
7,484
Then maybe...
Excel Workbook
ABCDEF
1STT1TigerLion
2STT2Lion
3TT-3Bear
4TP-3Cat
5TP5Dog
Sheet1
Excel 2007
Cell Formulas
RangeFormula
F1=INDEX($C$1:$C$6,COUNTIF($A$1:$A$5,INDEX($A$1:$A$5,MODE(MATCH($A$1:$A$5,$A$1:$A$5,0)))))
 

Watch MrExcel Video

Forum statistics

Threads
1,133,383
Messages
5,658,504
Members
418,450
Latest member
KarlP

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top