From: L. Howard Kittle on
Excel 2002

=COUNTIF(Data,"*9*")

This will return the number of cells in the range named Data that contain a
9.
How can I make this formula refer to a cell instead of using the desired
number in the formula. Say I have a drop down list in G1, if I select 4
then the formula should return the number of cells in Data that have a 4 in
them.

These do not work:

=COUNTIF(Data,"*Mud*")

Where G1 is a named cell Mud.

=COUNTIF(Data,"*G1*")

=COUNTIF(Data,"*INDIRECT(G1)*")

Thanks
Howard


From: ozgrid.com on
=COUNTIF(Data,"*" & A1 & "*")



--
Regards
Dave Hawley
www.ozgrid.com


"L. Howard Kittle" <lhkittle(a)comcast.net> wrote in message
news:u4JLAoy5KHA.5548(a)TK2MSFTNGP04.phx.gbl...
> Excel 2002
>
> =COUNTIF(Data,"*9*")
>
> This will return the number of cells in the range named Data that contain
> a 9.
> How can I make this formula refer to a cell instead of using the desired
> number in the formula. Say I have a drop down list in G1, if I select 4
> then the formula should return the number of cells in Data that have a 4
> in them.
>
> These do not work:
>
> =COUNTIF(Data,"*Mud*")
>
> Where G1 is a named cell Mud.
>
> =COUNTIF(Data,"*G1*")
>
> =COUNTIF(Data,"*INDIRECT(G1)*")
>
> Thanks
> Howard
>
>

From: L. Howard Kittle on
Thanks Dave, I was struggling with this one.

Regards,
Howard

"L. Howard Kittle" <lhkittle(a)comcast.net> wrote in message
news:u4JLAoy5KHA.5548(a)TK2MSFTNGP04.phx.gbl...
> Excel 2002
>
> =COUNTIF(Data,"*9*")
>
> This will return the number of cells in the range named Data that contain
> a 9.
> How can I make this formula refer to a cell instead of using the desired
> number in the formula. Say I have a drop down list in G1, if I select 4
> then the formula should return the number of cells in Data that have a 4
> in them.
>
> These do not work:
>
> =COUNTIF(Data,"*Mud*")
>
> Where G1 is a named cell Mud.
>
> =COUNTIF(Data,"*G1*")
>
> =COUNTIF(Data,"*INDIRECT(G1)*")
>
> Thanks
> Howard
>
>