Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
carl
 
Posts: n/a
Default Counting Elements in a String

I have strings like these:

AB;CD;EF;GH;IJ

Is there an easy way to count the number of elements in the string. In this
case the count would be 5.

Thank you in advance.
  #2   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
=LEN(A1)-LEN(SUBSTITUTE(A1,";";""))+1

--
Regards
Frank Kabel
Frankfurt, Germany

carl wrote:
I have strings like these:

AB;CD;EF;GH;IJ

Is there an easy way to count the number of elements in the string.
In this case the count would be 5.

Thank you in advance.



  #3   Report Post  
Leo Heuser
 
Posts: n/a
Default

One way:

=LEN(A1)-LEN(SUBSTITUTE(A1,";",""))+1

--
Best Regards
Leo Heuser

Followup to newsgroup only please.

"carl" skrev i en meddelelse
...
I have strings like these:

AB;CD;EF;GH;IJ

Is there an easy way to count the number of elements in the string. In

this
case the count would be 5.

Thank you in advance.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extract hyperlink string from excel cell Ryan Sapien Links and Linking in Excel 1 January 20th 05 12:24 AM
Counting every unique text string in a column doctor rick Excel Worksheet Functions 2 December 15th 04 07:36 AM
Delemited string Pierre Leclerc Excel Worksheet Functions 2 November 21st 04 06:45 AM
How do you extract numbers from a string of chacters in a cell (E. blackbeemer Excel Worksheet Functions 6 November 12th 04 09:00 AM
Add a string to a cell ramsdesk Excel Worksheet Functions 2 October 28th 04 07:20 AM


All times are GMT +1. The time now is 03:57 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"