![]() |
|
|
Welcome to the { mindfrost82.com } forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
counting commas within a string
Hi to All,
Cell A1 contains a text string such as 56,58,12,1,22,893 I want to determine how many numbers are contained within the string Simply, counting the commas and adding 1 one seems to be the easy answer How can I create an Excel formula to count the commas, or please suggest an alternative method. Thanks for your help, Cheers, RonW |
|
|||
|
Re: counting commas within a string
Hi RonW
Length of string minus length of sting without commas: =LEN(A1)-LEN(SUBSTITUTE(A1,",","")) HTH. Best wishes Harald <Ron.Winkley@gmail.com> skrev i melding news:4efd29cb-6978-4e8c-80ef-fbfd6f1c7d9d@y21g2000hsf.googlegroups.com... > Hi to All, > > Cell A1 contains a text string such as 56,58,12,1,22,893 > I want to determine how many numbers are contained within the string > Simply, counting the commas and adding 1 one seems to be the easy > answer > How can I create an Excel formula to count the commas, or please > suggest > an alternative method. > > Thanks for your help, > > Cheers, > RonW |
|
|||
|
RE: counting commas within a string
=LEN(E2)-LEN(SUBSTITUTE(E2,",",""))+1
with your data in E2 -- Gary''s Student - gsnu2007j "Ron.Winkley@gmail.com" wrote: > Hi to All, > > Cell A1 contains a text string such as 56,58,12,1,22,893 > I want to determine how many numbers are contained within the string > Simply, counting the commas and adding 1 one seems to be the easy > answer > How can I create an Excel formula to count the commas, or please > suggest > an alternative method. > > Thanks for your help, > > Cheers, > RonW > |
|
|||
|
Re: counting commas within a string
If you want to count the number of "elements" that are separated by commas:
=LEN(A1)-LEN(SUBSTITUTE(A1,",",""))+(A1<>"") Ron.Winkley@gmail.com wrote: > > Hi to All, > > Cell A1 contains a text string such as 56,58,12,1,22,893 > I want to determine how many numbers are contained within the string > Simply, counting the commas and adding 1 one seems to be the easy > answer > How can I create an Excel formula to count the commas, or please > suggest > an alternative method. > > Thanks for your help, > > Cheers, > RonW -- Dave Peterson |
![]() |
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|