Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I count the number of comma separated numbers in a google spreadsheet?

Tags:

I've got a cell which has values 1,2,3,4

I need a formula that returns 4 in another cell, however this Google spreadsheet looks really complicated. Also I need to trim because I might have white spaces between the numbers.

like image 948
dqm Avatar asked Dec 10 '13 11:12

dqm


People also ask

How do I count Comma Separated Values in Google Sheets?

The Non-Array Formula to Count Comma Separated Words in Google Sheets. You can use a LEN + SUBSTITUTE combo or LEN + REGEXREPLACE combo in this case.

How do I count the number of specific values in a column in Google Sheets?

You can use the =UNIQUE() and =COUNTIF() functions to count the number of occurrences of different values in a column in Google Sheets.


1 Answers

One option is to use the following formula:

=COUNT(SPLIT(A1; ",")) 

Here's an example:

enter image description here

like image 146
wchiquito Avatar answered Oct 02 '22 01:10

wchiquito