+ Reply to Thread
Results 1 to 6 of 6

Combining Sortby with Filter

  1. #1
    Forum Contributor
    Join Date
    05-28-2020
    Location
    Poland
    MS-Off Ver
    O365,
    Posts
    120

    Combining Sortby with Filter

    Good morning,

    I am trying to figure out, how I can combine filter function with sortby.

    For testing I have an addressbook with addresses, I filter the following way.

    Please Login or Register  to view this content.
    as soon as I add sortby at the beginning I get a value error:

    I tried to combine on such way

    Please Login or Register  to view this content.
    I found an article where using sort, it was combined with + but trying to use it with sortby did not work.

    What am I doing wrong and how to arrange it, that I first can filter and then sort?

    Thank you very much,

    Mike
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,333

    Re: Combining Sortby with Filter

    SORTBY goes inside the FILTER:

    =FILTER(SORTBY(addresses[[first_name]:[zip]],addresses[last_name],1,addresses[company_name],1),addresses[zip]<70000,"")
    Attached Files Attached Files
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Combining Sortby with Filter

    Please try

    =SORT(FILTER(addresses[[first_name]:[zip]],addresses[zip]<70000,""),{2,3})
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,277

    Re: Combining Sortby with Filter

    Power Query
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    05-28-2020
    Location
    Poland
    MS-Off Ver
    O365,
    Posts
    120

    Re: Combining Sortby with Filter

    Thanx for the help from everyone....

    I like the suggestions by AliGW & Bo_Ry and an interesting approach by Czeslaw...

    Thank you all,

    Mike

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,333

    Re: Combining Sortby with Filter

    You're welcome.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] SortBy & Filter Formula Trouble
    By GooglingDidntHelp in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 05-18-2022, 11:48 AM
  2. [SOLVED] Cannot use SORTBY when cells hidden
    By NicBKK in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-06-2022, 09:59 AM
  3. [SOLVED] SORTBY on many columns
    By NicBKK in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-06-2022, 12:01 AM
  4. Combining FILTER and SORTBY formulas
    By Ctromb in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-10-2021, 09:39 AM
  5. [SOLVED] SortBy + Filter Formula
    By ionelz in forum Excel General
    Replies: 9
    Last Post: 10-09-2021, 06:56 AM
  6. [SOLVED] Sort data using filter or sortby function (excel 365)
    By sunboy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-25-2021, 04:36 AM
  7. Combining a label filter with a (blank) filter
    By amphinomos in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 04-07-2014, 03:50 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1