I have two rows. Each row is containing numbers. The first row containers numbers I play with the lotto.

In the second row I enter the winning numbers.

In a cell I want a formula that makes a count of the matching numbers between the first and the secon row.

Thank you in advance

edited by moderator: subject line edited to be relevant

I'm assuming that there are never any duplicates in the numbers you choose or the winning numbers. For a set of 5 numbers try:

=SUMPRODUCT(--(ISNUMBER(MATCH(A1:E1, A2:E2, 0))))

Click Here Before Posting Data or VBA Code --->How To Post Data or Code.

Hey, Thank you so much. I was using the following formula:

=SUM(COUNTIF($B$1:$G$1,$B3),COUNTIF($B$1:$G$1,$C3),COUNTIF($B$1:$G$1,$D3),COUNTIF($B$1:$G$1,$E3),COUNTIF($B$1:$G$1,$F3),COUNTIF($B$1:$G$1,$G3)

Of course this is to long and unpractical.

Once again thank you so much. I am also so supprised I received your reply so fast.

Have a great day,

Phil

Ask Your Question

Weekly Poll

Do you think Amazon can bring Internet access to less-developed regions?

Discuss in The Lounge

Poll History