ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   count no. of commas (,) in a string in a cell (https://www.excelbanter.com/excel-worksheet-functions/225385-count-no-commas-string-cell.html)

hsg

count no. of commas (,) in a string in a cell
 
How can we count number of commas (,) appearing several times in a text
string in one cell. Is there any function which can be pasted in cell (B1)
to count no. of commas in cell (A1).

pl help
hsg

Rick Rothstein

count no. of commas (,) in a string in a cell
 
Try this formula...

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

--
Rick (MVP - Excel)


"hsg" wrote in message
...
How can we count number of commas (,) appearing several times in a text
string in one cell. Is there any function which can be pasted in cell (B1)
to count no. of commas in cell (A1).

pl help
hsg



Bernard Liengme[_3_]

count no. of commas (,) in a string in a cell
 
=LEN(A1)-LEN(SUBSTITUTE(A1,",",""))
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"hsg" wrote in message
...
How can we count number of commas (,) appearing several times in a text
string in one cell. Is there any function which can be pasted in cell (B1)
to count no. of commas in cell (A1).

pl help
hsg




hsg

count no. of commas (,) in a string in a cell
 
This is already answered. My query yesterday showed error in sending, so i
sent it again today, but later I found that my both querries were there
online and were asnwered as well. Thanks for help

"hsg" wrote:

How can we count number of commas (,) appearing several times in a text
string in one cell. Is there any function which can be pasted in cell (B1)
to count no. of commas in cell (A1).

pl help
hsg



All times are GMT +1. The time now is 06:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com