Sort list by size

Mrmath9

New Member
Joined
Jan 5, 2022
Messages
15
Office Version
  1. 2013
Platform
  1. Windows
Hi, i want to analyse a big amount of number and would love some help.

Column A = time
Column B = Price
Column C = Size

Aprox 200 000 rows :O

How can i sort this so the 20 biggest by size show up in Column D (biggest on top) followed by it´s time in Column E and it´s price Column F.

If i see big size at row 750, it would be great if i also could get the price for the previous (row 749) in Column G and the price for (row 751) in column H.

I want to see the 20 biggest by size like this.

Would this be possible? Hope you understand how i mean.
Can someone help me please, how can i code this?
I would appriciate it a lot. Even if you could just help with first section it would be great.
Best regards, thank you.
Dave.
 
Hello @Eric W
Just for curiosity why you have added columns for Previous Price, Next Price and Row?
 
Upvote 0

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Hello @Eric W
Just for curiosity why you have added columns for Previous Price, Next Price and Row?
The original post (the 7th line) asked for the previous/next prices. Post 4 asked for the row. I pretty much included everything the OP asked for, even though it was scattered in multiple posts.
 
Upvote 0
The original post (the 7th line) asked for the previous/next prices. Post 4 asked for the row. I pretty much included everything the OP asked for, even though it was scattered in multiple posts.

Thanks Erick, Now I got that.
I think I am a beginner in reading full requirement as well ;)
 
Upvote 0
You can get the arrangement you want just by dragging the formulas around:

Book1
ABCDEFGHI
1TimePriceSizeTop 20 SizesTimePrev PricePriceNext PriceRow
21:00119249815:0014151616
32:0021514934:003455
43:00326849320:001920021
54:00449341719:0018192020
65:00512838317:0016171818
76:0061033809:00891010
87:00725337111:0010111212
98:00827229514:0013141515
109:00938029016:0015161717
1110:00101272728:007899
1211:00113712683:002344
1312:001222926218:0017181919
1413:00132012537:006788
1514:001429522912:0011121313
1615:001549820113:0012131414
1716:00162901921:00 122
1817:00173831512:001233
1918:00182621285:004566
2019:001941712710:009101111
2120:00204931036:005677
Sheet40
Cell Formulas
RangeFormula
D2:D21D2=LARGE($C$2:$C$100,ROWS($C$2:$C2))
E2:E21E2=INDEX(A:A,$I2)
F2:F21F2=IF(I2>2,INDEX($B:$B,I2-1),"")
G2:G21G2=INDEX(B:B,$I2)
H2:H21H2=INDEX($B:$B,I2+1)
I2:I21I2=AGGREGATE(15,6,ROW($A$2:$A$100)/($C$2:$C$100=$D2),COUNTIF($D$2:$D2,$D2))


As far as changing the formulas, in the D and I formulas, you have to change the range to have the maximum number of rows you want. 200,000 based on your original question. I'd recommend against making it the whole length of the sheet for performance reasons. Change it to something like 300,000. You don't need to change the formulas if you want the top 30 instead of the top 20, just drag them further down the columns.
Hi :) I have a problem, i can´t get it to work yet. When i use excel it´s like it can´t read the formulas. I´ve tried both on new excel and old (2010 excel). Why can this be? :O Would this work on excel 2010 you think? So yea, excel don´t read the formulas and not sure why? :)
 
Upvote 0
What errors you are finding?
When i type the formulas a window come up it says:

There´s a problem with this formula. Not trying to type a formula? When the first character is an equal ("=")or minus("=")sign, Excel thinks it´s a formula: * You type =1+1, cell shows: 2
to get around this, type an apostrophe (') first: * you type '=1+1, cell shows: =1+1.

Not sure why this come up because it´s formula i want to write :D So nothing happen with the formula and this come up.
I don´t have text format i have general.
 
Upvote 0
Oh, I read something online. Seem to be the regional setting i need to change, my keyboard layout and regional setting are probably different than English since i live in Europe in non speaking English country. That probably make my excel not beeing able to read the formulas correctly since there is different , ; . and all those symbols. Hm anyone know what i should change it to? :D
 
Upvote 0
That was it, now it works on one of my computors :D Good. I changed my regional settings to US. Is there any difference between formulas on older version excel or same should work? One thing i wonder though. Everything works know but clock is 0.625 instead of 15:00 :D Why?
 
Upvote 0
That was it, now it works on one of my computors :D Good. I changed my regional settings to US. Is there any difference between formulas on older version excel or same should work? One thing i wonder though. Everything works know but clock is 0.625 instead of 15:00 :D Why?
Just change format from General to time

1641502715449.png
 
Upvote 0

Forum statistics

Threads
1,224,747
Messages
6,180,712
Members
452,995
Latest member
isldboy

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