#1   Report Post  
Posted to microsoft.public.excel.misc
caloy
 
Posts: n/a
Default Counting help

I have a string of numbers (ex. 123111222333123321). Is there a function that
would allow me to count how many 1's, 2's and 3's are in the string?
--
Caloyski
  #2   Report Post  
Posted to microsoft.public.excel.misc
Chip Pearson
 
Posts: n/a
Default Counting help

Try a formula like

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

This will return the number of 1's in cell A1.
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"caloy" wrote in message
...
I have a string of numbers (ex. 123111222333123321). Is there a
function that
would allow me to count how many 1's, 2's and 3's are in the
string?
--
Caloyski



  #3   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student
 
Posts: n/a
Default Counting help

Yes, compare the length of the string with and without a character:

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

--
Gary's Student


"caloy" wrote:

I have a string of numbers (ex. 123111222333123321). Is there a function that
would allow me to count how many 1's, 2's and 3's are in the string?
--
Caloyski

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
Counting of tickets that have certain criteria Nicki King Excel Worksheet Functions 1 January 20th 06 09:54 AM
conditional counting with Excel LeicaElmar Excel Worksheet Functions 1 October 17th 05 10:23 PM
Counting rows, then counting values. Michael via OfficeKB.com Excel Discussion (Misc queries) 7 August 4th 05 10:57 PM
Counting names in a column but counting duplicate names once TBoe Excel Discussion (Misc queries) 9 May 11th 05 11:24 PM
Counting... Patrick G Excel Worksheet Functions 3 February 23rd 05 10:05 PM


All times are GMT +1. The time now is 07:53 AM.

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

About Us

"It's about Microsoft Excel"