Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
clubin
 
Posts: n/a
Default Counting multiple numbers in one cell

I am trying to count various numbers and letters in multiple cells that are
seperated by commas.

Example

a1 = 1,4
b1 = 3,89,3,16
c1 = 3a,4,7

I only want to count the number of unique entries in each cell (meaning a1
would result in 2, b1 would result in 4, and c1 would result in 3, etc.)

Is there a way to do this?

Please help. Thank you.
  #2   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
if you only want to count the number of entries per cell try
=LEN(A1)-LEN(SUBSTITUTE(A1,",",""))+1

--
Regards
Frank Kabel
Frankfurt, Germany

"clubin" schrieb im Newsbeitrag
...
I am trying to count various numbers and letters in multiple cells

that are
seperated by commas.

Example

a1 = 1,4
b1 = 3,89,3,16
c1 = 3a,4,7

I only want to count the number of unique entries in each cell

(meaning a1
would result in 2, b1 would result in 4, and c1 would result in 3,

etc.)

Is there a way to do this?

Please help. Thank you.


  #3   Report Post  
Jason Morin
 
Posts: n/a
Default

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

HTH
Jason
Atlanta, GA

-----Original Message-----
I am trying to count various numbers and letters in

multiple cells that are
seperated by commas.

Example

a1 = 1,4
b1 = 3,89,3,16
c1 = 3a,4,7

I only want to count the number of unique entries in

each cell (meaning a1
would result in 2, b1 would result in 4, and c1 would

result in 3, etc.)

Is there a way to do this?

Please help. Thank you.
.

  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default

Should B1 be 3 or 4 (3 is a lot more tricky)?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"clubin" wrote in message
...
I am trying to count various numbers and letters in multiple cells that

are
seperated by commas.

Example

a1 = 1,4
b1 = 3,89,3,16
c1 = 3a,4,7

I only want to count the number of unique entries in each cell (meaning a1
would result in 2, b1 would result in 4, and c1 would result in 3, etc.)

Is there a way to do this?

Please help. Thank you.



  #5   Report Post  
clubin
 
Posts: n/a
Default

Thank you very much for the formula, very helpful. One other question. Is
there a shorter way to do this for multiple cells in a row (e.g. a1:a5)
rather than just adding up the formulas cell by cell (e.g.
=(LEN(A1)-LEN(SUBSTITUTE(A1,",",""))+1)+(LEN(A2)-LEN(SUBSTITUTE(A2,",",""))+1)+...etc.)

Thank you again for your help.

Chaim Lubin

"Frank Kabel" wrote:

Hi
if you only want to count the number of entries per cell try
=LEN(A1)-LEN(SUBSTITUTE(A1,",",""))+1

--
Regards
Frank Kabel
Frankfurt, Germany

"clubin" schrieb im Newsbeitrag
...
I am trying to count various numbers and letters in multiple cells

that are
seperated by commas.

Example

a1 = 1,4
b1 = 3,89,3,16
c1 = 3a,4,7

I only want to count the number of unique entries in each cell

(meaning a1
would result in 2, b1 would result in 4, and c1 would result in 3,

etc.)

Is there a way to do this?

Please help. Thank you.





  #6   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
try:
=SUMPRODUCT((LEN(A1:A10)-LEN(SUBSTITUTE(A1:A10,",",""))+1)*(A1:A10<"")
)

--
Regards
Frank Kabel
Frankfurt, Germany

"clubin" schrieb im Newsbeitrag
...
Thank you very much for the formula, very helpful. One other

question. Is
there a shorter way to do this for multiple cells in a row (e.g.

a1:a5)
rather than just adding up the formulas cell by cell (e.g.

=(LEN(A1)-LEN(SUBSTITUTE(A1,",",""))+1)+(LEN(A2)-LEN(SUBSTITUTE(A2,",",
""))+1)+...etc.)

Thank you again for your help.

Chaim Lubin

"Frank Kabel" wrote:

Hi
if you only want to count the number of entries per cell try
=LEN(A1)-LEN(SUBSTITUTE(A1,",",""))+1

--
Regards
Frank Kabel
Frankfurt, Germany

"clubin" schrieb im Newsbeitrag
...
I am trying to count various numbers and letters in multiple

cells
that are
seperated by commas.

Example

a1 = 1,4
b1 = 3,89,3,16
c1 = 3a,4,7

I only want to count the number of unique entries in each cell

(meaning a1
would result in 2, b1 would result in 4, and c1 would result in

3,
etc.)

Is there a way to do this?

Please help. Thank you.




  #7   Report Post  
clubin
 
Posts: n/a
Default

Thank you, I hope to be as good as you one day.

"Frank Kabel" wrote:

Hi
try:
=SUMPRODUCT((LEN(A1:A10)-LEN(SUBSTITUTE(A1:A10,",",""))+1)*(A1:A10<"")
)

--
Regards
Frank Kabel
Frankfurt, Germany

"clubin" schrieb im Newsbeitrag
...
Thank you very much for the formula, very helpful. One other

question. Is
there a shorter way to do this for multiple cells in a row (e.g.

a1:a5)
rather than just adding up the formulas cell by cell (e.g.

=(LEN(A1)-LEN(SUBSTITUTE(A1,",",""))+1)+(LEN(A2)-LEN(SUBSTITUTE(A2,",",
""))+1)+...etc.)

Thank you again for your help.

Chaim Lubin

"Frank Kabel" wrote:

Hi
if you only want to count the number of entries per cell try
=LEN(A1)-LEN(SUBSTITUTE(A1,",",""))+1

--
Regards
Frank Kabel
Frankfurt, Germany

"clubin" schrieb im Newsbeitrag
...
I am trying to count various numbers and letters in multiple

cells
that are
seperated by commas.

Example

a1 = 1,4
b1 = 3,89,3,16
c1 = 3a,4,7

I only want to count the number of unique entries in each cell
(meaning a1
would result in 2, b1 would result in 4, and c1 would result in

3,
etc.)

Is there a way to do this?

Please help. Thank you.




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
Re What is the formula for adding multiple numbers in a cell merlin_au Excel Discussion (Misc queries) 2 January 4th 05 11:50 AM
Paste rows of numbers from Word into single Excel cell BecG Excel Discussion (Misc queries) 1 December 8th 04 04:55 PM
Can vlookup return multiple matches in a single cell? cchristensen Excel Discussion (Misc queries) 3 December 2nd 04 01:56 AM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM
How do I link an identical cell address across multiple worksheet. Charlie Courier Excel Worksheet Functions 1 November 24th 04 04:40 PM


All times are GMT +1. The time now is 03:06 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"