How to return a number based on ranking?

excelos

Well-known Member
Joined
Sep 25, 2011
Messages
592
Office Version
  1. 365
Platform
  1. Windows
Hello

I have three formulas that calculate three different numbers in the format: "23 USA orders", "53 EU orders", "36 ASIA orders".

How can I return the first biggest and second biggest from the above?

Thanks!
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Hi if your data is in column B this may work:

=MAX(IFERROR(LEFT(B:B,3)*1,0))

Press CTRL+SHIFT+ENTER to make it an array.

I used a 3 in case the orders go to 100-999
 
Last edited by a moderator:
Upvote 0
Hi again,

It is better to separate the data into columns using Text to Columns and choose deliminated and check off by spaces. Then you can get the largest and 2nd, 3rd, 4th up to however many you want.

Sheet1


BCDEF
23 USA ordersUSAorders
53 EU ordersEUorders
36 ASIA ordersASIAorders

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:157.6px;"><col style="width:65.6px;"><col style="width:48px;"><col style="width:66.4px;"><col style="width:80.8px;"></colgroup><tbody>
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]2[/TD]

[TD="align: right"]23[/TD]

[TD="align: right"]53[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]3[/TD]

[TD="align: right"]53[/TD]

[TD="align: right"]36[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]4[/TD]

[TD="align: right"]36[/TD]

[TD="align: right"]23[/TD]

</tbody>

Spreadsheet Formulas
CellFormula
F2=IFERROR(LARGE($C$2:$C$20,ROW(1:1)),"")
F3=IFERROR(LARGE($C$2:$C$20,ROW(2:2)),"")
F4=IFERROR(LARGE($C$2:$C$20,ROW(3:3)),"")

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 
Last edited by a moderator:
Upvote 0
None of these solutions answers my question.

I suppose I need to use the LARGE function as I want to return the first and second largest.

However, the data I want to sort and then return, are a mixture of numbers+text.
 
Upvote 0
If you look at my 2nd reply in column F of the example it shows the largest and then the 2nd and 3rd (which is additional to show how it works as you copy the formula down.
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,305
Members
452,633
Latest member
DougMo

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