1. ## Formula (2000)

Hello, a few guys at work have entered into a lottery syndicate. How can I put a formula on an excel that will look at the numbers we select versus those actually drawn then return how many matches we have per line we have selected? IE assume we guess a line of 1, 3, 8 then another line of 4, 5, 9 and the actual draw gives
6, 7, 9. I need to show zero for the first line and 1 for the second.

Thanks Darren.

2. ## Re: Formula (2000)

Say that your guesses are in A1:C1, A2:C2 etc., and that the actual draw is in G1:I1.
To get the number of matches for A1:C1 in cell E1, enter the following formula in E1:

=SUM(COUNTIF(A1:C1,\$G\$1:\$I\$1))

It is an array formula, you must confirm it with Ctrl+Shift+Enter. This will put brackets { } around the formula, you shouldn't type those yourself! You can fill the formula in E1 down as far as needed.

3. ## Re: Formula (2000)

=SUMPRODUCT((A1:C1=\$A\$2:\$C\$2)+0)

Where A1:C1 is your picks and A2:C2 is the actual numbers

4. ## Re: Formula (2000)

This will only work if the values are in the same column!
if A1: c1 = 1, 2,3
and a2:c2 = 2,3,4

You formula will find NO matches since the 2 and 3 are NOT in the same columns.

Steve

5. ## Re: Formula (2000)

Steve,

It doesn't satisfy your requirements, but it does for the OP's example.

6. ## Re: Formula (2000)

It meets his "sample" data, but it does NOT meet the requirements of the poster's question. The example I gave, is a possibility in the scenario he suggested and I just wanted to point out that even though your formula was simpler than Hans' formula and it also is NOT an array formula, it would NOT answers the posters question.

7. ## Re: Formula (2000)

Steve,

My apologies for NOT answering the poster's question.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•