Countif formula perhaps

  • Thread starter Thread starter lhkittle
  • Start date Start date
L

lhkittle

Excel 2010

Where:

Data1 is a named range of nine cells. The values in each cell of Data1 will always be 1 to 9 or a combination of numbers 1 to 9 and each cell will have no duplicates. And each cell could have just 1 number or perhaps three or all 9.

P1 is a cell with a Data Validation drop down list of numbers 1 to 9.

In a separate cell I have used =COUNTIF(Data1,P1) to count the number times the P1 value occurs in Data1. It does not work.

Can you suggest a formula to do this?

Thanks.
Regards,
Howard
 
Excel 2010

Where:

Data1 is a named range of nine cells. The values in each cell of Data1 will always be 1 to 9 or a combination of numbers 1 to 9 and each cell will have no duplicates. And each cell could have just 1 number or perhaps three or all 9.

P1 is a cell with a Data Validation drop down list of numbers 1 to 9.

In a separate cell I have used =COUNTIF(Data1,P1) to count the number times the P1 value occurs in Data1. It does not work.

Can you suggest a formula to do this?

Thanks.
Regards,
Howard
Hi Howard

Your formula works for me using 2010, given that the Data1 is purely
digits 1 to 9. I changed it around and included 4 x 6's and a variety of
different combinations and it still worked for me.

What type of combination are you referring to, and when you say, "Not
Working", can you give an example of what the cell is displaying, if
anything.

HTH
Mick.
 
Hi Howard



Your formula works for me using 2010, given that the Data1 is purely

digits 1 to 9. I changed it around and included 4 x 6's and a variety of

different combinations and it still worked for me.



What type of combination are you referring to, and when you say, "Not

Working", can you give an example of what the cell is displaying, if

anything.



HTH

Mick.

Hi Mick,
Thanks for the response

Here is a sample of entries for Data1. With 4 in the drop down cell P1 I would expect to return the value 5. =COUNTIF(Data1,P1) returns 0 (zero).

123456789 456 234
123 4 479
5 149 289

Howard
 
Hi Howard

Well that paints a different picture in that you are wanting to count
specifically, the matching numerals within a group of numbers.

This would require the combination use of possibly MID, LEN, MATCH,
INDIRECT, essentially a fairly complex formula of which is beyond my
level of expertise I'm afraid.

Good luck

Mick.
 
Il 19/08/2012 06:17, (e-mail address removed) ha scritto:

[....]
Hi Mick,
Thanks for the response

Here is a sample of entries for Data1. With 4 in the drop down cell P1 I would expect to return the value 5. =COUNTIF(Data1,P1) returns 0 (zero).

123456789 456 234
123 4 479
5 149 289

Howard

Try
=SUMPRODUCT(1*NOT(ISERROR(FIND(P1,Data1))))

Hi, E.
 
Hi Howard,

Am Sat, 18 Aug 2012 21:17:42 -0700 (PDT) schrieb (e-mail address removed):
Here is a sample of entries for Data1. With 4 in the drop down cell P1 I would expect to return the value 5. =COUNTIF(Data1,P1) returns 0 (zero).

123456789 456 234
123 4 479
5 149 289

try:
=COUNT(SEARCH(P1,Data))
and enter the array formula with CTRL+Shift+Enter

In your example I see 6 times the 4


Regards
Claus Busch
 
Excel 2010



Where:



Data1 is a named range of nine cells. The values in each cell of Data1 will always be 1 to 9 or a combination of numbers 1 to 9 and each cell will have no duplicates. And each cell could have just 1 number or perhaps three or all 9.



P1 is a cell with a Data Validation drop down list of numbers 1 to 9.



In a separate cell I have used =COUNTIF(Data1,P1) to count the number times the P1 value occurs in Data1. It does not work.



Can you suggest a formula to do this?



Thanks.

Regards,

Howard



Excel 2010



Where:



Data1 is a named range of nine cells. The values in each cell of Data1 will always be 1 to 9 or a combination of numbers 1 to 9 and each cell will have no duplicates. And each cell could have just 1 number or perhaps three or all 9.



P1 is a cell with a Data Validation drop down list of numbers 1 to 9.



In a separate cell I have used =COUNTIF(Data1,P1) to count the number times the P1 value occurs in Data1. It does not work.



Can you suggest a formula to do this?



Thanks.

Regards,

Howard

Whoops, six is the correct numbrer, I missed one!

Thanks everyone, I'll give it a go.

Regards,
Howard
 
Excel 2010



Where:



Data1 is a named range of nine cells. The values in each cell of Data1 will always be 1 to 9 or a combination of numbers 1 to 9 and each cell will have no duplicates. And each cell could have just 1 number or perhaps three or all 9.



P1 is a cell with a Data Validation drop down list of numbers 1 to 9.



In a separate cell I have used =COUNTIF(Data1,P1) to count the number times the P1 value occurs in Data1. It does not work.



Can you suggest a formula to do this?



Thanks.

Regards,

Howard

Thanks to all!!!
Every suggestion offered worked.

Rgards,
Howard
 
Back
Top