Sort spilled data by the name of the column and not a number

CV12

Board Regular
Joined
Apr 6, 2020
Messages
82
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hello everyone,

I would like to sort my spilled data by the name of the column (Q - O). Is it somehow possible to change the '1' in the sort formula to the letter Q?
Same principe for the 1 = ascending and -1 descending. Would it be possible to have a dropdown menu with ascending and descending, and link that to either 1 or -1?

Would love to hear if that is possible :). Would be a bit easier for the user of my sheet.


=SORT(FILTER(M2:U19,U2:U19<>""),(1),1)

Would like to have the letter Q for example, in the red part of the formula.

Results SBB8.xlsx
ABCDEFGHIJKLMNOPQRSTU
1QWERTYUIOQWERTYUIO
211.00597.6523.93790.662.000.002.87377.7611597.64623.929790.657202.86591377.764
3Q23.00-732.7423.93780.724.000.002.87516.6023-732.74123.929780.719402.86591516.597
435.00590.7218.991294.886.000.002.10582.4935590.72318.98891294.88602.09575582.49
547.00-498.2818.991352.598.000.002.10694.5947-498.28318.98891352.59802.09575694.591
659.00270.059.121521.7910.000.001.47748.0559270.0549.122811521.791001.47377748.052
7611.00-263.789.121541.5912.000.001.47783.21611-263.7789.122811541.591201.47377783.21
8713.00184.416.141688.7114.000.001.08817.45713184.4076.137691688.711401.0778817.454
9815.00-174.776.141705.5716.000.001.08859.44815-174.7696.137691705.571601.0778859.44
10917.0034.790.541787.1618.000.000.01871.7191734.78630.540771787.161800.01237871.711
111019.004.470.541788.2920.000.000.01875.0710194.470310.540771788.292000.01237875.066
121121.00-157.58-5.721726.7522.000.00-1.09867.401121-157.58-5.720151726.75220-1.09106867.399
131223.00180.43-5.721713.8824.000.00-1.09824.541223180.434-5.720151713.88240-1.09106824.544
141325.00-276.02-9.521553.5826.000.00-1.50792.381325-276.024-9.521771553.58260-1.49798792.375
151427.00282.45-9.521533.5428.000.00-1.50751.201427282.452-9.521771533.54280-1.49798751.203
161529.00-509.98-19.501356.7630.000.00-2.04697.351529-509.983-19.50491356.76300-2.04185697.352
171631.00602.67-19.501300.1932.000.00-2.04586.401631602.67-19.50491300.19320-2.04185586.405
181733.00-739.33-24.16781.6734.000.00-2.85516.581733-739.327-24.1646781.675340-2.84872516.58
191835.00604.84-24.16790.6236.000.00-2.85378.571835604.842-24.1646790.623360-2.84872378.574
Sandbox2
Cell Formulas
RangeFormula
C2:K19C2=SORT(FILTER(M2:U19,U2:U19<>""),(1),1)
Dynamic array formulas.
Cells with Data Validation
CellAllowCriteria
F12List=$I$3#
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Try this

22 01 31.xlsm
ABCDEFGHIJKLMNOPQRSTU
1QWERTYUIOQWERTYUIO
2Sort By1835.00604.84-24.16790.6236.000.00-2.85378.5711.00597.6523.93790.662.000.002.87377.76
3Q1733.00-739.33-24.16781.6734.000.00-2.85516.5823.00-732.7423.93780.724.000.002.87516.60
41631.00602.67-19.501300.1932.000.00-2.04586.4035.00590.7218.991294.886.000.002.10582.49
5Asc/Desc1529.00-509.98-19.501356.7630.000.00-2.04697.3547.00-498.2818.991352.598.000.002.10694.59
6Descending1427.00282.45-9.521533.5428.000.00-1.50751.2059.00270.059.121521.7910.000.001.47748.05
71325.00-276.02-9.521553.5826.000.00-1.50792.38611.00-263.789.121541.5912.000.001.47783.21
81223.00180.43-5.721713.8824.000.00-1.09824.54713.00184.416.141688.7114.000.001.08817.45
91121.00-157.58-5.721726.7522.000.00-1.09867.40815.00-174.776.141705.5716.000.001.08859.44
101019.004.470.541788.2920.000.000.01875.07917.0034.790.541787.1618.000.000.01871.71
11917.0034.790.541787.1618.000.000.01871.711019.004.470.541788.2920.000.000.01875.07
12815.00-174.776.141705.5716.000.001.08859.441121.00-157.58-5.721726.7522.000.00-1.09867.40
13713.00184.416.141688.7114.000.001.08817.451223.00180.43-5.721713.8824.000.00-1.09824.54
14611.00-263.789.121541.5912.000.001.47783.211325.00-276.02-9.521553.5826.000.00-1.50792.38
1559.00270.059.121521.7910.000.001.47748.051427.00282.45-9.521533.5428.000.00-1.50751.20
1647.00-498.2818.991352.598.000.002.10694.591529.00-509.98-19.501356.7630.000.00-2.04697.35
1735.00590.7218.991294.886.000.002.10582.491631.00602.67-19.501300.1932.000.00-2.04586.40
1823.00-732.7423.93780.724.000.002.87516.601733.00-739.33-24.16781.6734.000.00-2.85516.58
1911.00597.6523.93790.662.000.002.87377.761835.00604.84-24.16790.6236.000.00-2.85378.57
20
Sort Filter
Cell Formulas
RangeFormula
C2:K19C2=SORT(FILTER(M2:U19,U2:U19<>""),MATCH(A3,M1:U1,0),IF(A6="Ascending",1,-1))
Dynamic array formulas.
Cells with Data Validation
CellAllowCriteria
A6ListAscending, Descending
 
Upvote 0
Solution

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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