+ Reply to Thread
Results 1 to 10 of 10

GoogleSheets: Sort by formula - two columns

  1. #1
    Registered User
    Join Date
    10-23-2022
    Location
    UK
    MS-Off Ver
    365 office
    Posts
    51

    GoogleSheets: Sort by formula - two columns

    Hi

    Thanks in advance for any help

    I need a formula which sorts two columns, 1 ascending and the other descending within a range

    Attached an example

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,093

    Re: Sort by formula - two columns

    Like this?
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,029

    Re: Sort by formula - two columns

    You can also use sort like
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    10-23-2022
    Location
    UK
    MS-Off Ver
    365 office
    Posts
    51

    Re: Sort by formula - two columns

    Thanks for coming back to me

    In excel it works perfect but in Google sheets get unknown sort by, any ideas?

    Thanks

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,093

    Re: Sort by formula - two columns

    And to include the headings:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,029

    Re: Sort by formula - two columns

    in Google sheets get unknown sort by, any ideas?
    Nope I don't use sheets.

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,093

    Re: Sort by formula - two columns

    You're posting in an Excel Forum with a stated profile of Office 365. Your thread is titled: "Sort by formula - two columns". And the sample file is called SortByExample.xlsx. Why would we consider a solution for Google Sheets?

    Looks like Fluff's solution, or a variation of it might work: https://support.google.com/docs/answer/3093150?hl=en-GB

  8. #8
    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,416

    Re: GoogleSheets: Sort by formula - two columns

    I have moved this thread to the appropriate forum section and added GoogleSheets to the thread title.
    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.

  9. #9
    Valued Forum Contributor janmorris's Avatar
    Join Date
    07-24-2021
    Location
    Japan
    MS-Off Ver
    Google Sheets (& Mac 2021)
    Posts
    1,066

    Re: GoogleSheets: Sort by formula - two columns

    Try this:

    =SORT(A2:E7,4,0,5,1)

    You can see in this sample file:
    https://docs.google.com/spreadsheets...gid=2100307022

    If the results are not what you expect.. then you should first do something about your DIV errors by wrapping your original formula in IFERROR() function.
    As a gesture off appreciation, you can click * Add Reputation at the foot of any of the posts of members who helped you reach a solution.

    And finally, was your problem solved? if so, please click Thread Tools above the first post of your enquiry, then select [Solved]

  10. #10
    Registered User
    Join Date
    10-23-2022
    Location
    UK
    MS-Off Ver
    365 office
    Posts
    51

    Re: GoogleSheets: Sort by formula - two columns

    Hi

    That's great, it worked

    Sorry for delayed reply, really appreciate it

    Thanks

+ 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. GoogleSheets: Result based on unique and countif formula
    By YOGESHP in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 9
    Last Post: 11-14-2022, 12:59 PM
  2. [SOLVED] Dynamic Sort Formula (Multiple Columns)
    By Krix in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-22-2020, 09:47 PM
  3. [SOLVED] Sort a Range - by 2 Columns - Formula
    By ionelz in forum Excel General
    Replies: 7
    Last Post: 03-21-2020, 03:37 PM
  4. Formula to sort columns instead of using the sort button
    By Hyflex in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-17-2016, 10:20 PM
  5. [SOLVED] Formula to sort columns in a spreadsheet accordingly
    By rimshot609 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-23-2014, 07:29 PM
  6. Replies: 2
    Last Post: 03-22-2013, 03:23 AM
  7. Macro to add formula to columns & then sort data
    By teaker in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-21-2009, 12:41 PM

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