Large Function + Search Criteria + Ignore Duplicate values

Aldonin

New Member
Joined
Jan 27, 2012
Messages
28
Hi all gurus:

Quick question here, I have a data table like the one below. For this, id like to be able to pull the result in column "C" this is, the second highest time for each specific code only. The challenge I've had so far is that Large does not account for duplicate values, so for Code 2000 I will always get 65 as the 2nd highest time.

Any suggestions?

Thanks all!!

[TABLE="width: 276"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]Code
[/TD]
[TD]Time
[/TD]
[TD]Personal Second Best
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]2000
[/TD]
[TD]65
[/TD]
[TD]47
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]2000
[/TD]
[TD]65
[/TD]
[TD]47
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]2000
[/TD]
[TD]47
[/TD]
[TD]47
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]2000
[/TD]
[TD]65
[/TD]
[TD]47
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]2000
[/TD]
[TD]33
[/TD]
[TD]47
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]2000
[/TD]
[TD]65
[/TD]
[TD]47
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8
[/TD]
[TD]2001
[/TD]
[TD]33
[/TD]
[TD]12
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9
[/TD]
[TD]2001
[/TD]
[TD]33
[/TD]
[TD]12
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10
[/TD]
[TD]2001
[/TD]
[TD]12
[/TD]
[TD]12
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
One possibility but I'm sure there's a more efficient way:


Book1
ABC
1codetimepsb
220006547
320006547
420004747
520006547
620003347
720006547
820013312
920013312
1020011212
Sheet1
Cell Formulas
RangeFormula
C2{=MAX(IF($A$2:$A$10=$A2,IF($B$2:$B$10<>MAX(IF($A$2:$A$10=$A2,$B$2:$B$10)),$B$2:$B$10)))}
Press CTRL+SHIFT+ENTER to enter array formulas.


WBD
 
Upvote 0

Forum statistics

Threads
1,223,705
Messages
6,173,989
Members
452,541
Latest member
haasro02

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