How can I get the two largest numbers from a column

Larry Fish

New Member
Joined
Jan 24, 2005
Messages
13
In Lotus I could create a formula @large(a1..a12,2) and I would get the second largest number in the range. Leave out the two and I would get the largest number. Or do I need to establish my worksheet like this.

..... A..........B............C.............D..........E...........F
1... Tree......Hight..... Profit........Yield.....Age........Hight
2....Apple.....>10................................................<16
3....Pear
4....Cherry
5
6.....Tree......Hight.......Profit.......Yield......Age
7... ...Apple... .18..........135..........14........20
8.... ..Cherry....12............96..........10........12
9.... ..Apple.... .13..........100...........9........14
10......Pear........9............75..........14........15
11......Cherry......8...........105.........10..........8


I can get the largest number with this formula =Dmax(A6..E11,"Profit",A1,A4) I would like this formula to give this result:
Apple, 135, 14

Then I need a formula that will give the same information for the next largest number: Cherry, 105, 10

Sorting is not an option.

Thanks for the help in advance
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
There is a LARGE function in Excel

same exact syntax as your @Large syntax from Lotus


It looks like you could do this:
Book1
ABCDEFGH
3ABCDEF
41TreeHightProfitYieldAgeHight
52Apple>10<16
63Pear
74Cherry
85
96TreeHightProfitYieldAgeApple,105,7
107Apple181351420
118Cherry13105914
129Pear1296236
1310Cherry9251110
1411Apple15100715
Sheet1



Formula
Code:
=LOOKUP(LARGE(D10:D14,2),D10:D14,B10:B14)  & "," & LARGE(D10:D14,2) & "," & LOOKUP(LARGE(D10:D14,2),E10:E14,E10:E14)
 
Upvote 0
=match(large(C7:C11,2),C7:C11,0)+6 will give the row of the 2nd largest #.
If that formula is placed in H1, for example, then these will give Cherry,105,10:
=INDEX(A:A,H1)
=INDEX(C:C,H1)
=INDEX(D:D,H1)

Bob Umlas
Excel MVP
 
Upvote 0
Larry, you gotta be more specific

Which formula, where did you type it, did you account for the cell references that may need to be changed...

If possible use the HTML maker (see the sticky posts at the top of the board)
 
Upvote 0
Gibbs

I can get your formula to work to this point. =Lookup(Large(D7:D12,2), D7:D13)

This is adjusted to my worksheet. When I add the rest I come up with an error.

Could you e-mail the formula to me at llfish@charter.net
 
Upvote 0
Have you tried copying the formula from the webpage and pasting the text into your formula window?
 
Upvote 0
Copy the text from where I wrote the formula between the code tags

like this
Code:
=LOOKUP(LARGE(D10:D14,2),D10:D14,B10:B14)  & "," & LARGE(D10:D14,2) & "," & LOOKUP(LARGE(D10:D14,2),E10:E14,E10:E14)

just highlight from the = sign to the end, and hit Ctrl - C

go to your excel sheet, go into the formula window for your cell (or anywhere) and hit Ctrl V.


I did not save my sample into a worksheet.
 
Upvote 0
Larry Fish said:
...
I can get the largest number with this formula =Dmax(A6..E11,"Profit",A1,A4) I would like this formula to give this result:
Apple, 135, 14

Then I need a formula that will give the same information for the next largest number: Cherry, 105, 10

...

It looks like you want a Top N list (with N = 2) of trees based on profit. Right?
 
Upvote 0

Forum statistics

Threads
1,224,585
Messages
6,179,704
Members
452,938
Latest member
babeneker

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