![]() |
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 |
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 |
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 |
All times are GMT +1. The time now is 06:01 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com