SORT(FILTER Function - Need to sort by adjacent column

ollyhughes1982

Well-known Member
Joined
Nov 27, 2018
Messages
677
Office Version
  1. 365
Platform
  1. MacOS
Hi all,

Re the below screenshot:
Sort By Distance Issue Screenshot.jpg


I have a working worksheet, which works and calculates what I want. However, I would just rather that it sorted by column A, rather than by the name of the parkrun (column C), where the main function is calculated.

Is there a way I can add something into the function in column C, so that the results sort by column A or B (either is fine)?

I have included a link to file here (it’s relatively small and should open up quickly): Sort By Distance Issue.xlsx

Thanks in advance,

Olly.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Try clearing columns A:C & putting this in A4
Excel Formula:
=LET(f,FILTER('parkrun Reader Dump'!B3:AW5002,('parkrun Reader Dump'!N3:N5002=1)*('parkrun Reader Dump'!O3:O5002=1)*('parkrun Reader Dump'!P3:P5002=1)*('parkrun Reader Dump'!AP3:AP5002<>1)*('parkrun Reader Dump'!AV3:AV5002>0)*('parkrun Reader Dump'!AV3:AV5002<78)),SORT(INDEX(f,SEQUENCE(ROWS(f)),{47,48,1}),1))

PS you currently have your distances in the wrong column, this will correct that.
 
Upvote 0
Solution
Try clearing columns A:C & putting this in A4
Excel Formula:
=LET(f,FILTER('parkrun Reader Dump'!B3:AW5002,('parkrun Reader Dump'!N3:N5002=1)*('parkrun Reader Dump'!O3:O5002=1)*('parkrun Reader Dump'!P3:P5002=1)*('parkrun Reader Dump'!AP3:AP5002<>1)*('parkrun Reader Dump'!AV3:AV5002>0)*('parkrun Reader Dump'!AV3:AV5002<78)),SORT(INDEX(f,SEQUENCE(ROWS(f)),{47,48,1}),1))

PS you currently have your distances in the wrong column, this will correct that.
Well spotted re having them the wrong way around! 🤦‍♂️ Thanks, I'll try this now
 
Upvote 0

Forum statistics

Threads
1,215,063
Messages
6,122,935
Members
449,094
Latest member
teemeren

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