#1   Report Post  
Posted to microsoft.public.excel.misc
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


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 464
Default Countif formula

=COUNTIF(Data,"*" & A1 & "*")



--
Regards
Dave Hawley
www.ozgrid.com


"L. Howard Kittle" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 698
Default Countif formula

Thanks Dave, I was struggling with this one.

Regards,
Howard

"L. Howard Kittle" wrote in message
...
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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
COUNTIF FORMULA ISSUES - NEED FORMULA CORRECTED Debbi Excel Worksheet Functions 2 November 18th 09 04:47 AM
Countif formula Mike Excel Discussion (Misc queries) 3 May 2nd 07 07:56 PM
help in countif formula. martin Excel Discussion (Misc queries) 3 June 1st 06 10:21 AM
CountIf formula results in the formula itself being displayed. NewKid Excel Worksheet Functions 9 December 21st 05 11:10 PM
Another Countif Formula Stephen Excel Discussion (Misc queries) 3 April 22nd 05 04:29 PM


All times are GMT +1. The time now is 08:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"