Is it possible to compare a vector of values to a single scalar value in Excel?
Example:
=IF(A1:Z1 > 0, 1, 0)
Typically, I've seen the following:
=IF( AND( A1>0, B1>0, C1>0, . . . Y1>0, Z1>0 ), 1, 0)
Is it possible to compare a vector of values to a single scalar value in Excel?
Example:
=IF(A1:Z1 > 0, 1, 0)
Typically, I've seen the following:
=IF( AND( A1>0, B1>0, C1>0, . . . Y1>0, Z1>0 ), 1, 0)
How about
=IF(COUNTIF(A1:Z1,">0")=COUNT(A1:Z1),1,0)
or
=IF(COUNTIF(A1:Z1,">0")=COUNTA(A1:Z1),1,0)
or
=IF(COUNTIF(A1:Z1,">0")=COLUMNS(A1:Z1),1,0)
depending on which works best in your situation.
Although this doesn't address the generalized question, for your particular example wouldn't this do the trick?
=IF( Min(A1:Z1) > 0, 1, 0)
If the smallest one is greater than 0, then they all are. Otherwise there is at least one that is not greater than 0.