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

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
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)))
 
Upvote 0
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
 
Upvote 0
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)))))
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,749
Members
448,989
Latest member
mariah3

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
Back
Top