Right to Left Match the number of nonblank cells
2 answers
Array formula (validated with ctrl+ shift+ enter)
=MAX(IF(LEN(AA1:AH1)<>0,COLUMN(AA1:AH1)))
must specify the index of the column containing the last nonblank cell, even in a row with multiple intercalated blank cells.
Array formula (validated with ctrl+ shift+ enter)
=MAX(IF(LEN(AA1:AH1)=0,COLUMN(AA1:AH1)))
must specify the index of the column containing the last blank cell, even in a row with multiple intercalated blank cells.
Then you can use these values ββto calculate the results you want.
those.:
Combine it all:
=MAX(IF(LEN(AA1:AH1)<>0,COLUMN(AA1:AH1))) - MAX(IF(LEN(AA1:AH1)=0,COLUMN(AA1:AH1)))
should give you the output you want.
+1
source to share