+ Reply to Thread
Results 1 to 4 of 4

Cannot use SORTBY when cells hidden

  1. #1
    Registered User
    Join Date
    08-08-2018
    Location
    Bangkok
    MS-Off Ver
    MS365 for Mac (latest version)
    Posts
    85

    Cannot use SORTBY when cells hidden

    Hello Gurus

    I have some UNITS that have Revenue and those that are closed I hid the rows (needed for another report)
    I want to have another field feeding off of that data to sort the Units by Revenue, from top to bottom
    I am using the SORTBY but it's messed up because of the hidden rows I guess?

    How can I do this better?

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Cannot use SORTBY when cells hidden

    The SORTBY is working just fine - it's just that some data is now going into hidden rows. If you unhide those rows, you'll see all the data in the correct order. You have two choices I think:

    1. Use the SORTBY in a range underneath your current table.
    2. Use the SORTBY on another sheet.

    WBD
    Office 365 on Windows 11, looking for rep!

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,056

    Re: Cannot use SORTBY when cells hidden

    However, if you wanted to sort ONLY the visible rows, use this on another sheet... or below your source data:

    =LET(d,Sheet1!C7:D69,a,Sheet1!D7:D69,s,Sheet1!D7,v,SUBTOTAL(3,OFFSET(s,ROW(a)-ROW(s),)),va,FILTER(d,v),SORTBY(va,(INDEX(va,,2)),-1))
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

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

    Re: Cannot use SORTBY when cells hidden

    Please try

    =LET(z,C7:D69,s,SEQUENCE(ROWS(z)),c,SUBTOTAL(102,OFFSET(z,s-1,1,1)),d,SUBTOTAL(102,OFFSET(z,,1,s)),INDEX(z,MOD(LARGE(INDEX(z,,2)*10^6+s,IF(c,d,s-d+SUM(c))),10^6),SEQUENCE(,2)))
    Attached Files Attached Files

+ 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 on many columns
    By NicBKK in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-06-2022, 12:01 AM
  2. [SOLVED] Extract and sortby in descending order
    By paradise2sr in forum Excel General
    Replies: 5
    Last Post: 01-09-2022, 05:19 AM
  3. Combining FILTER and SORTBY formulas
    By Ctromb in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-10-2021, 09:39 AM
  4. [SOLVED] SortBy + Filter Formula
    By ionelz in forum Excel General
    Replies: 9
    Last Post: 10-09-2021, 06:56 AM
  5. [SOLVED] Format all cells in all sheets to Protection Hidden on visible and hidden tabs
    By DeRo22 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-28-2014, 03:17 PM
  6. Replies: 0
    Last Post: 01-15-2014, 05:17 PM
  7. copying hidden cells and paste to non hidden cells on same sheet
    By 2newguy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-11-2007, 02:39 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