Countif formula perhaps

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
 
L

Living the Dream

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.
 
L

lhkittle

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
 
L

Living the Dream

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.
 
P

plinius

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.
 
C

Claus Busch

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
 
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

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

Thanks everyone, I'll give it a go.

Regards,
Howard
 
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

Thanks to all!!!
Every suggestion offered worked.

Rgards,
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