Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / September 2006

Tip: Looking for answers? Try searching our database.

Lottery check

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ron - 13 Sep 2006 01:59 GMT
We buy 35 tickets twice a week and always the same numbers. Can I make a
spreadsheet that will check our tickets against the winning numbers?
Max - 13 Sep 2006 02:06 GMT
> We buy 35 tickets twice a week and always the same numbers. Can I make a
> spreadsheet that will check our tickets against the winning numbers?

One way to set it up ..

Assuming the winning numbers will be entered in A1:F1 in Sheet1,
for example: 1, 15, 25, 38, 48, 49
(The numbers within A1:F1 need not be sorted, can be in any order)

And the picked #s are listed in Sheet2, in cols B to G, row1 down
4 15 20 28 35 49
1 15 25 38 47 48
6 15 25 38 41 49
etc

(as before, the numbers within each row need not be sorted)

Put in say, I1:
=SUMPRODUCT(--ISNUMBER(MATCH(B1:G1,Sheet1!$A$1:$F$1,0)))
Copy I1 down.

Col I will return the desired # of matched numbers
For the sample data, you'll get in I1:I3   :   2, 5, 4
Signature

Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---

Ron - 13 Sep 2006 12:18 GMT
We're in Singapore a few times a year! We teach at Ngee Ann Poly. How wierd...
Thanks Max. I'll try this out and get back.

> > We buy 35 tickets twice a week and always the same numbers. Can I make a
> > spreadsheet that will check our tickets against the winning numbers?
[quoted text clipped - 19 lines]
> Col I will return the desired # of matched numbers
> For the sample data, you'll get in I1:I3   :   2, 5, 4
Max - 14 Sep 2006 02:01 GMT
> .. How weird ...

.. it's ok, cyberspace knows no boundaries <g>
Signature

Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---

Ron - 14 Sep 2006 02:57 GMT
Hi Max,
The formula works but only for approx. 20 lottery tickets and then it
doesn't seem to check the rest. Am I doing something wrong? It's almost as if
it needs to be told to check them all???
Can anyone help?
Ron

> > .. How weird ...
>
> .. it's ok, cyberspace knows no boundaries <g>
Max - 14 Sep 2006 03:14 GMT
> The formula works but only for approx. 20 lottery tickets and then it
> doesn't seem to check the rest. Am I doing something wrong?
> It's almost as if it needs to be told to check them all???

Try these checks, in sequence ..
1. Check calc mode is set to auto (Tools > Options > Calculation tab, Check
"Automatic" > OK)
2. Check that cells are not inadvertently pre-formatted as text (Format >
Cells). If so, re-format the cell as General or Number, then re-confirm the
formula (click inside the formula bar, press Enter) -- you need to re-confirm
the formula before it'll work. Re-formatting alone will not trigger it.
Signature

Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---

Max - 14 Sep 2006 03:44 GMT
Just a further thought .. if there's the possibility of the source winning
numbers and/or picked numbers being either "text-entered" -- ie numbers
entered with a preceding apostrophe, or entered into cells pre-formatted as
text (the pre-formatting as text unknown to you, of course), then use this
slightly tweaked version instead:

=SUMPRODUCT(--ISNUMBER(MATCH(B1:G1+0,Sheet1!$A$1:$F$1+0,0)))

The "+0" to both source ranges will coerce the text numbers (if any) to real
numbers for correct results.
Signature

Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---

Ron - 14 Sep 2006 18:15 GMT
Some were text formatted. I dhanged them all and it all works as you said.
Thanks again Max. We'll be in SQ Oct 22 thru Nov 7.
Ron in Ottawa, Canada ronbinette@rogers.com
How's your Access?

> Just a further thought .. if there's the possibility of the source winning
> numbers and/or picked numbers being either "text-entered" -- ie numbers
[quoted text clipped - 6 lines]
> The "+0" to both source ranges will coerce the text numbers (if any) to real
> numbers for correct results.
Max - 15 Sep 2006 02:13 GMT
> Some were text formatted.
> I changed them all and it all works as you said.
> Thanks again Max.

Glad we got that bit nailed down ..

> How's your Access?
Very skimpy ..
Signature

Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---

Ron - 13 Sep 2006 15:54 GMT
Thanks Max. It works perfectly!
And thank you to all who replied.
This is GREAT!

> > We buy 35 tickets twice a week and always the same numbers. Can I make a
> > spreadsheet that will check our tickets against the winning numbers?
[quoted text clipped - 19 lines]
> Col I will return the desired # of matched numbers
> For the sample data, you'll get in I1:I3   :   2, 5, 4
Max - 14 Sep 2006 01:58 GMT
Glad to hear that, Ron !
Thanks for feeding back ..
Signature

Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---

> Thanks Max. It works perfectly!
> And thank you to all who replied.
> This is GREAT!
Biff - 13 Sep 2006 03:42 GMT
Here's a file that does what you want.

Ticket Checker.xls  84kb

http://cjoint.com/?jneKqRchxY

It has a sheet for 5 numbers and one for 6 numbers. There is one very simple
macro that clears the number grid if you click the RESET button. It will
highlight and count any matches. It uses data validation so you won't make
any mistakes when you enter your numbers.

Biff

> We buy 35 tickets twice a week and always the same numbers. Can I make a
> spreadsheet that will check our tickets against the winning numbers?
Ron - 13 Sep 2006 12:06 GMT
There are 7 numbers drawn so that checker won't work but thanks.

> Here's a file that does what you want.
>
[quoted text clipped - 11 lines]
> > We buy 35 tickets twice a week and always the same numbers. Can I make a
> > spreadsheet that will check our tickets against the winning numbers?
Don Guillett - 13 Sep 2006 13:34 GMT
Here is an idea I used on the Texas Lottery until I decided NOT to play
anymore. Ripoff.

conditional format using formula to highlight the cell
=SUMPRODUCT(($B$5:$F$5=B9)*1)
& copy across
to count
=IF(G9=0,"",SUMPRODUCT(COUNTIF(B9:F9,$B$5:$F$5)))
with conditional formatting cell value is >=4

Signature

Don Guillett
SalesAid Software
dguillett1@austin.rr.com

> We buy 35 tickets twice a week and always the same numbers. Can I make a
> spreadsheet that will check our tickets against the winning numbers?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.