vendredi 21 juin 2019

Arrayformula to number blank cells between non-blank ones from 0 to n

I want to check an array/row,

  1. ignoring non-blank cells (setting to ""),

  2. numbering empty cells from 0 to n,

  3. resetting the number to 0 if the next non-blank cell is found.

  4. stopping at the last cell

So, it'd look like this:

        A       B
 0  APPLE   
 1              0
 2              1
 3  BANANA  
 4              0
 5              1
 6              2
 7  CHERRY  
 8  DURIAN  
 9              0
 10 EGG 

A is the original and B is what the function is applied.

Aucun commentaire:

Enregistrer un commentaire