Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Mahendra
 
Posts: n/a
Default A cell contains "1,2,3"; and I want to count those sep. by comma

I have three columns. Column A contains a number, column B contains bunch of
numbers separated by comma corresponding to the number in column A. In the
column C, I want to count the numbers in col. B separated by comma. Example:

Column A Column B Column C
1200 2,3,4,8 4 (i.e.
there are four numbers

in column B)
  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

One possibility:

=IF(B1="","",LEN(B1)-LEN(SUBSTITUTE(B1,",",""))+1)

In article ,
"Mahendra" wrote:

I have three columns. Column A contains a number, column B contains bunch of
numbers separated by comma corresponding to the number in column A. In the
column C, I want to count the numbers in col. B separated by comma. Example:

Column A Column B Column C
1200 2,3,4,8 4 (i.e.
there are four numbers

in column B)

  #3   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

Mahendra,

In C1, to count the items in B1

=IF(B1<"",LEN(B1)-LEN(SUBSTITUTE(B1,",",""))+1,0)

HTH,
Bernie
MS Excel MVP


"Mahendra" wrote in message
...
I have three columns. Column A contains a number, column B contains bunch of
numbers separated by comma corresponding to the number in column A. In the
column C, I want to count the numbers in col. B separated by comma. Example:

Column A Column B Column C
1200 2,3,4,8 4 (i.e.
there are four numbers

in column B)



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
cell color index comparison MINAL ZUNKE New Users to Excel 1 June 30th 05 07:11 AM
Count the number of specific values in a cell Kevin Excel Worksheet Functions 4 June 3rd 05 04:20 AM
How do you count number of characters in a single cell Joe Excel Worksheet Functions 1 February 18th 05 09:08 PM
Show Blank is cell value=0 but count as a zero in sum. How to format this cell ? Markus Obermayer Excel Discussion (Misc queries) 1 January 4th 05 08:01 PM
Count unique alpha numeric "characters" in a common cell WIM4246 Excel Worksheet Functions 4 December 11th 04 02:27 AM


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