sortby returns 0

%3CLINGO-SUB%20id%3D%22lingo-sub-3201824%22%20slang%3D%22en-US%22%3Esortby%20returns%200%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3201824%22%20slang%3D%22en-US%22%3E%3CP%3EWhen%20I%20type%20%3Dsortby(a2%3Ah2316%2Cg2%3Ag2316%2C1%2Ch2%3Ah2316%2C-1)%20a%200%20show%20up%20in%20the%20cell.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere's%20the%20beginning%20of%20the%20table%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CTABLE%20width%3D%22297%22%3E%3CTBODY%3E%3CTR%3E%3CTD%20width%3D%2287%22%3E1%3C%2FTD%3E%3CTD%20width%3D%2220%22%3E1%3C%2FTD%3E%3CTD%20width%3D%2220%22%3E2%3C%2FTD%3E%3CTD%20width%3D%2220%22%3E3%3C%2FTD%3E%3CTD%20width%3D%2220%22%3E4%3C%2FTD%3E%3CTD%20width%3D%2220%22%3E5%3C%2FTD%3E%3CTD%20width%3D%2253%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%2257%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3Eaback%3C%2FTD%3E%3CTD%3Ea%3C%2FTD%3E%3CTD%3Eb%3C%2FTD%3E%3CTD%3Ea%3C%2FTD%3E%3CTD%3Ec%3C%2FTD%3E%3CTD%3Ek%3C%2FTD%3E%3CTD%3E1%3C%2FTD%3E%3CTD%3E0.9308%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3Eabase%3C%2FTD%3E%3CTD%3Ea%3C%2FTD%3E%3CTD%3Eb%3C%2FTD%3E%3CTD%3Ea%3C%2FTD%3E%3CTD%3Es%3C%2FTD%3E%3CTD%3Ee%3C%2FTD%3E%3CTD%3E1%3C%2FTD%3E%3CTD%3E1.3058%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CT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%3E%3C%2FTR%3E%3CTR%3E%3CTD%3Eabyss%3C%2FTD%3E%3CTD%3Ea%3C%2FTD%3E%3CTD%3Eb%3C%2FTD%3E%3CTD%3Ey%3C%2FTD%3E%3CTD%3Es%3C%2FTD%3E%3CTD%3Es%3C%2FTD%3E%3CTD%3E1%3C%2FTD%3E%3CTD%3E1.7072%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3Eacorn%3C%2FTD%3E%3CTD%3Ea%3C%2FTD%3E%3CTD%3Ec%3C%2FTD%3E%3CTD%3Eo%3C%2FTD%3E%3CTD%3Er%3C%2FTD%3E%3CTD%3En%3C%2FTD%3E%3CTD%3E0%3C%2FTD%3E%3CTD%3E1.4308%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3201824%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3202574%22%20slang%3D%22en-US%22%3ERe%3A%20sortby%20returns%200%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3202574%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1315170%22%20target%3D%22_blank%22%3E%40james-morris%3C%2FA%3E%26nbsp%3BCopied%20your%20sample%20data%20and%20formula.%20Adjusted%20only%20the%20ranges%20to%20match%20the%20size%20of%20the%20data%20and%20it%20seems%20to%20work%20as%20intended.%20Sort%20the%20entire%20table%2C%20first%20by%20column%20G%2C%20then%20by%20column%20H.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202022-02-23%20at%2007.34.31.png%22%20style%3D%22width%3A%20330px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F350617i1C969F95D88502BB%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%202022-02-23%20at%2007.34.31.png%22%20alt%3D%22Screenshot%202022-02-23%20at%2007.34.31.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EFile%20attached.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

When I type =sortby(a2:h2316,g2:g2316,1,h2:h2316,-1) a 0 show up in the cell.

 

Here's the beginning of the table

 

112345  
abackaback10.9308
abaseabase11.3058
abateabate11.3058
abbeyabbey10.0000
abbotabbot11.8961
abhorabhor00.8750
abideabide00.5000
abledabled00.0000
abodeabode00.9308
abortabort01.9519
aboutabout02.8269
aboveabove00.9308
abuseabuse01.3750
abyssabyss11.7072
acornacorn01.4308
1 Reply

@james-morris Copied your sample data and formula. Adjusted only the ranges to match the size of the data and it seems to work as intended. Sort the entire table, first by column G, then by column H.

Screenshot 2022-02-23 at 07.34.31.png

File attached.