Count list items within cells

A

Alder

I have a column that is either contains a blank or one or more
integers separated by semi-colons. If there are values the
semi-colons allow me to search for particular numbers using the Excel
Find function. There is no trailing semi-colon at the end of the list
of values.

Examples:

<blank>
43458
44344;44545;54233

What I would like is a worksheet function that returns a zero when the
cell is blank, or the number of values in the list.

Any suggestions or pointers would be appreciated. Thanks.

Terry
 
A

Alder

I have a column that is either contains a blank or one or more
integers separated by semi-colons. If there are values the
semi-colons allow me to search for particular numbers using the Excel
Find function. There is no trailing semi-colon at the end of the list
of values.

Examples:

<blank>
43458
44344;44545;54233

What I would like is a worksheet function that returns a zero when the
cell is blank, or the number of values in the list.

Any suggestions or pointers would be appreciated. Thanks.

Terry

I found an answer myself:

=IF(<cellref>="",0,SUM(LEN(<cellref>)-SUM(LEN(SUBSTITUTE(<cellref>,";",""))))+1)

Thanks,

Terry
 

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