Thread: Countif formula
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
L. Howard Kittle L. Howard Kittle is offline
external usenet poster
 
Posts: 698
Default Countif formula

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