How to return the second non-blank cell from row excel for Mac -


to return first non-blank cell in row use:

=index(c1:f1,match(true,index((c1:f1<>0),0),0)) 

however, how return second non-blank cell in row? have text in cells.

when attempt =index(c1:f1,aggregate(15,6,column(c1:f1)/sign(len(c1:f1)),2)), suggested.

i don't next non-blank cell returned, f cell returned, if there others should have been returned before it. if there nothing in f, 0.

use aggregate function's small subfunction.

=index(a1:a13, aggregate(15, 6, row(1:13)/sign(len(a1:a13)), 2)) 

the 2 k small subfunction. replace row(2:2) , tighten of other cell references if want fill down third, fourth, etc.

position_within

when returning column index number index function, aggregate function uses column function instead of row function.. column($a:$d) give position within columns c:f; e.g. 1, 2, 3 or 4.

position_within_columns


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

mapreduce - Resource manager does not transit to active state from standby -

serialization - Convert Any type in scala to Array[Byte] and back -