Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find the length of an array in Google Sheets?

I have a formula =SPLIT(E2,"/") and I want to find the length of the array that the result returns.

I tried:

=ARRAYFORMULA(COUNT(SPLIT(E2,"/")))
=COUNT(SPLIT(E2,"/"))
=LEN(SPLIT(E2,"/"))
like image 692
brikas Avatar asked Sep 12 '25 07:09

brikas


2 Answers

You could try COUNTA as this one returns the number of values in a dataset, instead of COUNT:

=COUNTA(SPLIT(E2,"/"))

Reference

  • COUNTA Function.
like image 146
Dibash Sapkota Avatar answered Sep 13 '25 23:09

Dibash Sapkota


=COLUMNS(SPLIT(E2,"/"))
like image 32
MattKing Avatar answered Sep 13 '25 21:09

MattKing