Results 1 to 7 of 7
Thread: Formula (2000)

20031006, 23:39 #1
 Join Date
 May 2003
 Location
 Manchester, Gtr Manchester, England
 Posts
 552
 Thanks
 0
 Thanked 0 Times in 0 Posts
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.

20031007, 00:06 #2
 Join Date
 Mar 2002
 Posts
 84,353
 Thanks
 0
 Thanked 29 Times in 29 Posts
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.
Adapt the above to your situation.

20031008, 00:34 #3
 Join Date
 Feb 2003
 Posts
 89
 Thanks
 0
 Thanked 0 Times in 0 Posts
Re: Formula (2000)
=SUMPRODUCT((A1:C1=$A$2:$C$2)+0)
Where A1:C1 is your picks and A2:C2 is the actual numbers

20031008, 11:33 #4
 Join Date
 Jul 2002
 Location
 Pittsburgh, Pennsylvania, USA
 Posts
 11,225
 Thanks
 14
 Thanked 342 Times in 335 Posts
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

20031008, 14:07 #5
 Join Date
 Feb 2003
 Posts
 89
 Thanks
 0
 Thanked 0 Times in 0 Posts
Re: Formula (2000)
Steve,
It doesn't satisfy your requirements, but it does for the OP's example.

20031008, 14:18 #6
 Join Date
 Jul 2002
 Location
 Pittsburgh, Pennsylvania, USA
 Posts
 11,225
 Thanks
 14
 Thanked 342 Times in 335 Posts
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.

20031008, 14:55 #7
 Join Date
 Feb 2003
 Posts
 89
 Thanks
 0
 Thanked 0 Times in 0 Posts
Re: Formula (2000)
Steve,
My apologies for NOT answering the poster's question.