I want to be able to count the how many numbers separated by commas are in a given cell. Is there a function that will do that for me?
If the cell contains 4,6,9,11,15 I want the function to return a value of 5.
Thanks for any help.
I want to be able to count the how many numbers separated by commas are in a given cell. Is there a function that will do that for me?
If the cell contains 4,6,9,11,15 I want the function to return a value of 5.
Thanks for any help.
Hi,
This should work
=SUM(LEN(A1)-LEN(SUBSTITUTE(A1,",","")))/LEN(",")+1
it counts the number of commas in cell A1 and returns 4.Then the +1 adds the extra one.
The attached site has more help
http://support.microsoft.com/kb/1876...d=2513&sid=340
If you need to do this on a regualr basic you might want to look at some code to add a user function. See attached link
http://www.j-walk.com/ss/excel/tips/tip93.htm
VBA Noob
Thanks a bunch. This will be good homework.
No Problem.
Enjoy
VBA Noob
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks