View Single Post
 
Old 11-07-2014, 07:25 PM
Natalee Natalee is offline Windows 8 Office 2013
Novice
 
Join Date: Nov 2014
Posts: 6
Natalee is on a distinguished road
Default Help with LEN and Substitute function

Hi,

I am using the LEN and Substitute function to count numbers in a single cell. As an example, I have a cell that contains the numbers 5,15,25,30 and this would give me a count of 4. I am okay with this calculation.

Where I have a problem is omitting the blank cells or cells that contain 0. The function always gives me a 1 even when I added to ignore zeros. This is my formula:

=LEN(SUBSTITUTE(F20&",",",0",""))-LEN(SUBSTITUTE(SUBSTITUTE(F20&",",",0",""),",","") )

Can someone please help me figure out how to get this right?

Thanks,
Nat
Reply With Quote