Home > Software design >  Formula to count if a text is written in a cell
Formula to count if a text is written in a cell

Time:02-04

a 0
a 1

 
 
a 2
a 3
 
 
a 4

enter image description here

Count starts at 0. ArrayFormula is used and data is checked in a specified range. If a value is written in the cell, it counts. However, if the cell is empty, it does not count. I want to express it in a formula!

CodePudding user response:

Use SCAN, like this:


=ArrayFormula(IF(A1:A10="",,SCAN(-1,A1:A10,LAMBDA(a,c,a (c<>"")))))

CodePudding user response:

Try with this formula in P1. If you start in O2, change O:O with O2:O

=BYROW(O:O,LAMBDA(each,IF(each="","",COUNTA(FILTER(O1:each,ISTEXT(O1:each))))))
  • Related