Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
kish20
 
Posts: n/a
Default how to count occurence of numbers separated by , in a single cell

Pls tell how I can count the occurence of particular number in list of
numbers separated by comma in single cell.I would further extend this
counting to the entire column.

Eg the number in a first cell : 2,3,4,5
Second cell: 2,3,6
third cell : 3,5,7 and so on for more than
two rows..
I wish to count how many times number 2 appeared in the entire column of
more than two rows.

Here the answer expected from excel programming is 2.
  #2   Report Post  
Harlan Grove
 
Posts: n/a
Default

"kish20" wrote...
Pls tell how I can count the occurence of particular number in list of
numbers separated by comma in single cell.I would further extend this
counting to the entire column.

Eg the number in a first cell : 2,3,4,5
Second cell: 2,3,6
third cell : 3,5,7 . . .

....
Here the answer expected from excel programming is 2.


=SUMPRODUCT(LEN(","&A1:A3&",")-LEN(SUBSTITUTE(","&A1:A3&",",",2,",",,")))


  #3   Report Post  
kish20
 
Posts: n/a
Default

Hi Harlan,

Please suggest me a good book to learn excel functions and programming.

"Harlan Grove" wrote:

"kish20" wrote...
Pls tell how I can count the occurence of particular number in list of
numbers separated by comma in single cell.I would further extend this
counting to the entire column.

Eg the number in a first cell : 2,3,4,5
Second cell: 2,3,6
third cell : 3,5,7 . . .

....
Here the answer expected from excel programming is 2.


=SUMPRODUCT(LEN(","&A1:A3&",")-LEN(SUBSTITUTE(","&A1:A3&",",",2,",",,")))



  #4   Report Post  
Harlan Grove
 
Posts: n/a
Default

"kish20" wrote...
Please suggest me a good book to learn excel functions and programming.

....

Re Functions: I have no idea. I've never read any. I used to read the
spreadsheet columns in PC World, PC Magazine and Byte way back, and Lotus
Magazine too, but that's now over a decade ago. I never bought a general
book on spreadsheets (didn't have to, the manuals that came with Lotus
Symphony, Lotus 123, VP-Planner and even Excel prior to Excel 97 were all
very good, though the How To guide that came with Symphony was the best of
all of them).

Re Programming: maybe buy John Green's book or John Walkenbach's latest, but
the best programming books aren't VBA programming books.


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
Match Last Occurrence of two numbers and Count to Previous Occurence Sam via OfficeKB.com Excel Worksheet Functions 33 April 4th 05 02:17 PM
Count and Sum Total occurrances of two specific numbers Sam via OfficeKB.com Excel Worksheet Functions 10 March 29th 05 08:13 PM
count cells with unique numbers Alex Excel Worksheet Functions 1 February 21st 05 07:46 PM
Count Consecutive Numbers in a Row Sam via OfficeKB.com Excel Worksheet Functions 5 February 19th 05 02:49 AM
count a group of numbers but do not count duplicates Lisaml Excel Worksheet Functions 2 January 26th 05 11:19 PM


All times are GMT +1. The time now is 09:45 PM.

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"