excel - Count number of blank cells in row between last cell and next non-blank cell -


is possible (with formula preferably) count number of blank cells in row, counting starts @ given column , counts going backward (e.g. right left) number of blank cells until non-blank cell found? in example below, counting begins @ column h , proceeds leftward. using counta or countif seem reasonable tools use, unsure on how terminate counting once non-blank cell found.

excel screen shot count blank cells until non-blank

you can use if values in table text:

=countblank(indirect(char(97+match("zzzz",b2:h2))&row()&":h"&row())) 

match("zzzz",b2:h2) returns column number in last non-blank cell is.

char(97+ column number) returns letter of column.

append row number give reference countblank has start &row()

&":h"&row()) gives reference of last cell, h plus row number.

indirect turns concatenated text range excel can evaluate.


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -