How to arrange this ?

john65442

New Member
Joined
Feb 25, 2011
Messages
13
Hi :-

i have this excel file which contain's two Columns A & B

they are like this :-

Column A +++ Column B

eze e +++ Not Enough Data
fred +++ 1,998,600
e revo +++ 10,700
ivete sangalo +++ 13,300
g e patterson +++ 4,800
e tuning +++ 14,000
jonas brothers +++ 487,700


image :-



Uploaded with ImageShack.us


and i want them to become arranged similar to this way :-



Column A +++ Column B


fred +++ 1,998,600
jonas brothers +++ 487,700
e tuning +++ 14,000
ivete sangalo +++ 13,300
e revo +++ 10,700
g e patterson +++ 4,800
eze e +++ Not Enough Data

is there a formula to do this ?


Thank you .
 
Last edited:

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
C1 =IF(ISNUMBER(B1),1,0) copy down column
Sort all 3 columns using col B then C both Descending
 
Upvote 0
When you entered the numbers did you manually type the comma (1,998,600) or did you just enter the number (1998600) and the format the cells to show commas?, I will assume the latter.
The idea of entering a formula in column ”C” is to determine if the contents of “B” is actually a number or Text.
The result of the formula should be “0” for Text and “1” for the numbers. If your formula result in “C” is different, check you actually entered values.

The next stage is to select the whole range A1:C7 and use the ribbon (or menu at the top) go to Data – Sort and in the first range choose sort by “Column B – Values – Largest to smallest”
Add a level and choose sort by “Column C” – Values – Smallest to Largest”

Back-up plan, take a look here
http://www.homeandlearn.co.uk/excel2007/excel2007s3p1.html
 
Last edited:
Upvote 0
Hi,

The simplest way to do this would be via Sort menu. Note, however, that Excel always considers text higher than any numerical value, so "eze e" would be always at the top.

If you're after a formula way, try this...

Excel 2007 and beyond:

<table style="font-family:Arial,Arial; font-size:10pt; background-color:#ffffff; padding-left:2pt; padding-right:2pt; " border="1" cellpadding="0" cellspacing="0"> <colgroup><col style="font-weight:bold; width:30px; "><col style="width:94px;"><col style="width:111px;"><col style="width:12px;"><col style="width:94px;"><col style="width:111px;"></colgroup><tbody><tr style="background-color:#cacaca; text-align:center; font-weight:bold; font-size:8pt; "><td>
</td><td>A</td><td>B</td><td>C</td><td>D</td><td>E</td></tr><tr style="height:17px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">1</td><td>Names</td><td>Data</td><td>
</td><td>Names</td><td>Data</td></tr><tr style="height:17px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">2</td><td>eze e </td><td> Not Enough Data</td><td>
</td><td>fred </td><td style="text-align:right; ">1,998,600</td></tr><tr style="height:17px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">3</td><td>fred </td><td style="text-align:right; ">1,998,600</td><td>
</td><td>jonas brothers </td><td style="text-align:right; ">487,700</td></tr><tr style="height:17px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">4</td><td>e revo </td><td style="text-align:right; ">10,700</td><td>
</td><td>e tuning </td><td style="text-align:right; ">14,000</td></tr><tr style="height:17px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">5</td><td>ivete sangalo </td><td style="text-align:right; ">13,300</td><td>
</td><td>ivete sangalo </td><td style="text-align:right; ">13,300</td></tr><tr style="height:17px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">6</td><td>g e patterson </td><td style="text-align:right; ">4,800</td><td>
</td><td>e revo </td><td style="text-align:right; ">10,700</td></tr><tr style="height:17px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">7</td><td>e tuning </td><td style="text-align:right; ">14,000</td><td>
</td><td>g e patterson </td><td style="text-align:right; ">4,800</td></tr><tr style="height:17px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">8</td><td>jonas brothers </td><td style="text-align:right; ">487,700</td><td>
</td><td>
</td><td>
</td></tr></tbody></table>
Formula in E2 is:

Code:
=IFERROR(LARGE(B$2:B$8,ROWS(E$2:E2)),"")
Array formula in D2 is:

Code:
=IF(N(E2),INDEX(A$2:A$8,SMALL(IF(B$2:B$8=E2,ROW(B$2:B$8)-ROW(B$2)+1),COUNTIF($E$2:E2,E2))),"")
Array formulas require committing with CTRL+SHIFT+ENTER.

If you're using Excel 2003 or a previous version, for the first formula, use:

Code:
=IF(ROWS(E$2:E2)<=COUNT(B$2:B$8),LARGE(B$2:B$8,ROWS(E$2:E2)),"")
Note that both these solutions are not perfect in as much as "eze e" appears in the wrong place in the first solution (the Sort) and does not appear at all in the second solution. Better to give "eze e" a numerical value like 0 so that things work as desired.

Matty
 
Upvote 0

Forum statistics

Threads
1,224,591
Messages
6,179,768
Members
452,940
Latest member
rootytrip

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