Hello,

how can I use the countif function to count the number of star (*) in a
range ?

If I do =COUNTIF(B1:B8;"=*"), I have the number of cells because * is
understood as a wild card...

Thanks in advance

Laurent

Re: COUNTIF: seems easy but.... by KL

KL
Wed Mar 21 03:51:58 CDT 2007

if you want the number of cells that contain * then:

=COUNTIF(B1:B8,"=*~**")

if you want the number of * in all cells then:

=SUMPRODUCT(LEN(B1:B8)-LEN(SUBSTITUTE(B1:B8,"*","")))

--
KL
[MVP - Microsoft Excel]
RU: http://www.mvps.ru/Program/Default.aspx
ES: http://mvp.support.microsoft.com/?LN=es-es
EN: http://mvp.support.microsoft.com/?LN=en-us
Profile: https://mvp.support.microsoft.com/profile=AB32F8EE-8ED3-4AB9-ADDA-9E6C73C09A36


"Laurent" <paucahrdl@hotmail.com> wrote in message news:2C49A41E-B22F-4C5F-B547-995BE2FE81F3@microsoft.com...
> Hello,
>
> how can I use the countif function to count the number of star (*) in a
> range ?
>
> If I do =COUNTIF(B1:B8;"=*"), I have the number of cells because * is
> understood as a wild card...
>
> Thanks in advance
>
> Laurent
>