ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Finding Min Cell values excluding zero in alternate columns (https://www.excelbanter.com/excel-worksheet-functions/53874-re-finding-min-cell-values-excluding-zero-alternate-columns.html)

bpeltzer

Finding Min Cell values excluding zero in alternate columns
 
If your input array is in A21:H21,
=IF(MAX(A21:H21)<=0,"NA",LARGE(A21:H21,COUNTIF(A21 :H21,"0")))
should return the smallest positive value (or "NA") if there isn't one. The
logic is to count the number of positive values, and use that as an argument
to the LARGE function. --Bruce

"MichaelC" wrote:

I have an array that is 1 row high by 16 columns wide.
Each cell may contain a positive value, or a zero.

I need a formula to find the "Minimum value that is greater than zero" in
columns 1,3,5,7,9,11,13 and 15.

=MIN(A1,C1,E1,G1,I1,K1,M1,O1) will always return the zero value while I
need the minimum value that is greater than zero.
If I use nested IF functions to exclude zeroes I run foul of the max of 7
allowed.
I would greatly appreciate any help and thank you in advance for any offered.
MichaelC



All times are GMT +1. The time now is 11:13 PM.

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