Search code examples
arraysgoogle-sheetsgoogle-sheets-formula

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,"/"))

Solution

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

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

    Reference