Simple Sorting Question

RomoBot

New Member
Joined
Oct 25, 2021
Messages
14
Office Version
  1. 365
Platform
  1. MacOS
I know there's a simple solution to this, but I am too green to figure it out.

Basically, I have this range:
963142857
ABCDEFGHI
241315181013152016

And I want to in a new cell a function to find the highest two based on Row 3 to look like this

95
AH
2420
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Book1
ABCDEFGHIJ
1963142857
2ABCDEFGHI
3241315181013152016
4
5
695
7AH
82420
9
Sheet3
Cell Formulas
RangeFormula
A6:B8A6=INDEX($A$1:$I$3,SEQUENCE(3),MATCH(LARGE($A$3:$I$3,SEQUENCE(1,2)),$A$3:$I$3,0))
Dynamic array formulas.
 
Upvote 0
=INDEX($A$1:$I$3,SEQUENCE(3),MATCH(LARGE($A$3:$I$3,SEQUENCE(1,2)),$A$3:$I$3,0))
I'm getting a #NAME error, I don't seem to have the SEQUENCE function, even though I have excel 2021?
Incidentally, same goes for SORT function, so @Eric W 's solution won't work either...
 
Upvote 0
Maybe:

Book1
ABCDEFGHIJ
1963142857
2ABCDEFGHI
3241315181013152016
4
5
695
7AH
82420
9
Sheet3
Cell Formulas
RangeFormula
A6:B8A6=INDEX($A$1:$I$3,ROW(1:3),MATCH(LARGE($A$3:$I$3,COLUMN(A:B)),$A$3:$I$3,0))
Dynamic array formulas.
 
Upvote 0
Well, that's surprising! I would have thought that Excel 2021 would have the dynamic functions in it. Without them, you'd need to get a little more complicated:

Book2
ABCDEFGHI
1963142857
2ABCDEFGHI
3241315181013152016
4
5
695
7AH
82420
Sheet11
Cell Formulas
RangeFormula
A6:B7A6=INDEX($A1:$I1,AGGREGATE(15,6,(COLUMN($A1:$I1)-COLUMN($A1)+1)/($A$3:$I$3=A$8),COUNTIF($A$8:A$8,A$8)))
A8:B8A8=LARGE($A$3:$I$3,COLUMNS($A8:A8))


JGordon11, if the OP doesn't have SEQUENCE, I'd be surprised if the SPILL functionality works. Also, your formula has trouble if there are duplicate values. Put 24 in D3 to see what I mean.
 
Upvote 0
Maybe:

Book1
ABCDEFGHIJ
1963142857
2ABCDEFGHI
3241315181013152016
4
5
695
7AH
82420
9
Sheet3
Cell Formulas
RangeFormula
A6:B8A6=INDEX($A$1:$I$3,ROW(1:3),MATCH(LARGE($A$3:$I$3,COLUMN(A:B)),$A$3:$I$3,0))
Dynamic array formulas.
This will work!!!

Thanks!

EDITED: I think I got the spill response. Trying over in google sheets, maybe that will work?
 
Last edited:
Upvote 0
Well, that's surprising! I would have thought that Excel 2021 would have the dynamic functions in it. Without them, you'd need to get a little more complicated:

Book2
ABCDEFGHI
1963142857
2ABCDEFGHI
3241315181013152016
4
5
695
7AH
82420
Sheet11
Cell Formulas
RangeFormula
A6:B7A6=INDEX($A1:$I1,AGGREGATE(15,6,(COLUMN($A1:$I1)-COLUMN($A1)+1)/($A$3:$I$3=A$8),COUNTIF($A$8:A$8,A$8)))
A8:B8A8=LARGE($A$3:$I$3,COLUMNS($A8:A8))


JGordon11, if the OP doesn't have SEQUENCE, I'd be surprised if the SPILL functionality works. Also, your formula has trouble if there are duplicate values. Put 24 in D3 to see what I mean.
Eric, as usual, you are correct. RomoBot - note that my formula won't work if there is a tie for the largest value in row 3. Which brings up another problem, what would you want to display if there are three or more tied for number 1?
 
Upvote 0
Eric, as usual, you are correct. RomoBot - note that my formula won't work if there is a tie for the largest value in row 3. Which brings up another problem, what would you want to display if there are three or more tied for number 1?
I'd need it to display the three tied numbers. If it makes it easier, I could have the whole spread re-display in numerical order?
 
Upvote 0

Forum statistics

Threads
1,214,403
Messages
6,119,308
Members
448,886
Latest member
GBCTeacher

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