Countif formula

L

L. Howard Kittle

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top