简体   繁体   English

使用数组公式检查降序(范围内有空白单元格) - Excel

[英]Check Descending Order with Array Formula (with blank cells in range) - Excel

I'm trying to ensure a list of numbers is sorted in descending order. 我正在尝试确保数字列表按降序排序。 The array formula I have works great for lists without any blank cells, but it breaks when blanks are present. 数组公式我适用于没有任何空白单元格的列表,但是当空白存在时它会中断。 My data is in range R6:R825 . 我的数据在R6:R825范围内。

={AND('Tab 1'!R6:R824>='Tab 1'!R7:R825)}

Is it possible to have the formula perform the same descending sort check while ignoring the blank cells? 是否可以让公式执行相同的降序排序检查而忽略空白单元格?

You could use this simple formula to sort the numbers in descending order, 您可以使用这个简单的公式按降序对数字进行排序,

=IFERROR(LARGE(A:A,ROW()),"")

Drag the fill handle or double click to sort the complete range. 拖动填充柄或双击以对整个范围进行排序。 The above formula works only if the data starts from row 1. Looks like your data starts from row 6 (R6). 上述公式仅在数据从第1行开始时有效。看起来您的数据从第6行(R6)开始。 Hence use the below formula, 因此使用以下公式,

=IFERROR(LARGE(R:R,ROW()-5),"")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM