An *array-formula* expression that will find the first value in a range
is:
=INDEX(G14:G34,MIN(IF(G14:G34<"",ROW(G14:G34)-ROW(G14)+1)))
For example if I want to test if the first non-empty cell in G14:G34 is
0 and return "zero" if it is or twice the number if it is nonzero,
=IF(a,2*a,"zero")
Here a is the first non-empty cell. Then I would use the following
*array* formula:
=IF(INDEX(G14:G34,MIN(IF(G14:G34<"",ROW(G14:G34)-ROW(G14)+1))),2*INDEX(G14:G34,MIN(IF(G14:G34<"",R OW(G14:G34)-ROW(G14)+1))),"zero")
An *array* formula must be entered with the combination
Ctrl+Shift+Enter.
I based my example on yours, assuming that the COUNTIF construct
attempts to find the cell. Note that your formula will necessarily
return 0 if an element <1.85 is found.
HTH
Kostis Vezerides
wrote:
I need a formula that counts the first value only in an array as the
rest of the values in the array will be the same, but does not count
all the values in the array, that is, even if the
array(column)populates. This is the formula I have now and believe that
I am close but it has to be the first value and it could populate
anywhere in the array. This is what I have so far,
=IF(COUNTIF(G14:G34,"<1.85")/COLUMN(G14:G34),1-COUNTIF(G14:G34,"<1.85")/COLUMN(G14:G34)*COUNTIF(G14:G34,"<1.85")/COLUMN(G14:G34),"").
It works if one cell in the array is populated but when more than one
cell is populated it counts the other cells. I need it to only count
the first cell only. It's a % to match formula that will work off of
the very first values that populate the array. Thanks.