A cell contains "1,2,3"; and I want to count those sep. by comma

G

Guest

I have three columns. Column A contains a number, column B contains bunch of
numbers separated by comma corresponding to the number in column A. In the
column C, I want to count the numbers in col. B separated by comma. Example:

Column A Column B Column C
1200 2,3,4,8 4 (i.e.
there are four numbers

in column B)
 
B

Bernie Deitrick

Mahendra,

In C1, to count the items in B1

=IF(B1<>"",LEN(B1)-LEN(SUBSTITUTE(B1,",",""))+1,0)

HTH,
Bernie
MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top