Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
In cell B1: I wanted to count the number of commas (,) in cell A1
A, B, C, D, F, G, H 2 Please check what's wrong with my COUNT formula, COUNTA(A1,","), somehow the result is always "2". Thank you -- Cong Nguyen |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
=LEN(A1)-LEN(SUBSTITUTE(A1,",",""))
-- Gary''s Student - gsnu200762 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You're using the wrong formula.
COUNTA counts cells that are not empty - it doesn't count the occurences of a character within a single cell. This formula should do the trick: =LEN(A1)-LEN(SUBSTITUTE(A1,",","")) This counts how many characters are in cell A1, it then counts how many characters are in cell A1 with the , removed. Take one from the other and you have your result. "Cong Nguyen" wrote: In cell B1: I wanted to count the number of commas (,) in cell A1 A, B, C, D, F, G, H 2 Please check what's wrong with my COUNT formula, COUNTA(A1,","), somehow the result is always "2". Thank you -- Cong Nguyen |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thank you Gary"s Student,
It works great. -- Cong Nguyen "Cong Nguyen" wrote: In cell B1: I wanted to count the number of commas (,) in cell A1 A, B, C, D, F, G, H 2 Please check what's wrong with my COUNT formula, COUNTA(A1,","), somehow the result is always "2". Thank you -- Cong Nguyen |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Dear Darren Bartrup,
Thank you very much for the expanation. Now it's clear. -- Cong Nguyen "Darren Bartrup" wrote: You're using the wrong formula. COUNTA counts cells that are not empty - it doesn't count the occurences of a character within a single cell. This formula should do the trick: =LEN(A1)-LEN(SUBSTITUTE(A1,",","")) This counts how many characters are in cell A1, it then counts how many characters are in cell A1 with the , removed. Take one from the other and you have your result. "Cong Nguyen" wrote: In cell B1: I wanted to count the number of commas (,) in cell A1 A, B, C, D, F, G, H 2 Please check what's wrong with my COUNT formula, COUNTA(A1,","), somehow the result is always "2". Thank you -- Cong Nguyen |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Count Problem | New Users to Excel | |||
COUNT IF (AND / OR) SUM IF PROBLEM | Excel Worksheet Functions | |||
count problem | Excel Worksheet Functions | |||
Count IF problem | Excel Worksheet Functions | |||
count problem | Excel Worksheet Functions |