开发者

find max or min in excel, with conditions

开发者 https://www.devze.com 2023-03-20 05:29 出处:网络
In my spreadsheet I have a column with negative 开发者_C百科and positive values.I need to get the minimum among all positive values and the maximum among all negative ones.How can I do so?Use array fo

In my spreadsheet I have a column with negative 开发者_C百科and positive values. I need to get the minimum among all positive values and the maximum among all negative ones. How can I do so?


Use array formulas. In the following examples, the values you're checking are in A2:A10.

Maximum negative:

=MAX(IF(A2:A10<0,A2:A10))

Press Ctrl+Shift+Enter when entering the formula. Formula will then appear bracketed by {...}.

Minimum positive:

=MIN(IF(A2:A10>=0,A2:A10))

Also enter as an array formula by pressing Ctrl+Shift+Enter

0

精彩评论

暂无评论...
验证码 换一张
取 消