ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Maximum negative number (https://www.excelbanter.com/excel-discussion-misc-queries/233834-maximum-negative-number.html)

Tigerxxx

Maximum negative number
 
Hello,

In Excel 2007, I have a range of positive and negative numbers:
Example: -5,-4,-3,-2,0,1,4,6,7....etc.
I want to select the maximum of the negative numbers i.e. "-2" in the above
example using a formula. How should I write the formula?

Please advise.

Mike H

Maximum negative number
 
Hi,

Try this array formula

=MAX(IF(A1:A20<0,A1:A20))

This is an array formula which must be entered by pressing CTRL+Shift+Enter
'and not just Enter. If you do it correctly then Excel will put curly brackets
'around the formula {}. You can't type these yourself. If you edit the formula
'you must enter it again with CTRL+Shift+Enter.

Mike

"Tigerxxx" wrote:

Hello,

In Excel 2007, I have a range of positive and negative numbers:
Example: -5,-4,-3,-2,0,1,4,6,7....etc.
I want to select the maximum of the negative numbers i.e. "-2" in the above
example using a formula. How should I write the formula?

Please advise.


Tigerxxx

Maximum negative number
 
thanks a lot!

"Mike H" wrote:

Hi,

Try this array formula

=MAX(IF(A1:A20<0,A1:A20))

This is an array formula which must be entered by pressing CTRL+Shift+Enter
'and not just Enter. If you do it correctly then Excel will put curly brackets
'around the formula {}. You can't type these yourself. If you edit the formula
'you must enter it again with CTRL+Shift+Enter.

Mike

"Tigerxxx" wrote:

Hello,

In Excel 2007, I have a range of positive and negative numbers:
Example: -5,-4,-3,-2,0,1,4,6,7....etc.
I want to select the maximum of the negative numbers i.e. "-2" in the above
example using a formula. How should I write the formula?

Please advise.



All times are GMT +1. The time now is 03:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com