ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Count periods in a cell (https://www.excelbanter.com/excel-programming/351287-count-periods-cell.html)

Carim[_3_]

Count periods in a cell
 
Hi,

I cannot get Countif to return the number of periods in cell A1
(formatted as text) : "1.1.1.1"

Thanks for your help

Cheers
Carim


Bob Phillips[_6_]

Count periods in a cell
 
=LEN(A1)-LEN(SUBSTITUTE(A1),".","")

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Carim" wrote in message
oups.com...
Hi,

I cannot get Countif to return the number of periods in cell A1
(formatted as text) : "1.1.1.1"

Thanks for your help

Cheers
Carim




Carim[_3_]

Count periods in a cell
 

As usual ... thanks to Tom O ...

found the answer :

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


Carim[_3_]

Count periods in a cell
 
Hi Bob,

Thanks a lot ... our messages crossed ...

Regards

Carim



All times are GMT +1. The time now is 12:50 AM.

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