Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default combination of numbers in lottery

As a beginner with Excel and VBA I have the following problem. I do kee
track of lottery numbers in a sheet.

Don't ask me why. It doesn't help me win a big price. There is a dra
of six numbers every week, from 1 to 45. I

keep them in six collumns. From the year 1996 to this week. I'd like t
seek combinations of numbers, say 2 or 3

numbers. If I, for example seek 3 numbers, 4-5-12 then they should sho
up highlighted or coloured or whatever,

if they excist in that combination. Or else give a statement that th
combination doesn't excist.
I have tried something with conditional formating but I can't seem t
get that to do what I want. Is there

anybody who can give me a hint!!

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default combination of numbers in lottery

This should be easy, but need a bit more information as I don't know much
about lotteries.
Does the order of the numbers matter?
Does it matter in which columns the numbers are (there are 6 columns, but
you mention 3 numbers)?

RBS

"knoertje " wrote in message
...
As a beginner with Excel and VBA I have the following problem. I do keep
track of lottery numbers in a sheet.

Don't ask me why. It doesn't help me win a big price. There is a draw
of six numbers every week, from 1 to 45. I

keep them in six collumns. From the year 1996 to this week. I'd like to
seek combinations of numbers, say 2 or 3

numbers. If I, for example seek 3 numbers, 4-5-12 then they should show
up highlighted or coloured or whatever,

if they excist in that combination. Or else give a statement that the
combination doesn't excist.
I have tried something with conditional formating but I can't seem to
get that to do what I want. Is there

anybody who can give me a hint!!!


---
Message posted from http://www.ExcelForum.com/


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default combination of numbers in lottery

Let's say your lottery numbers for the last 52 weeks are in A3:F54. In A1:C1
you put the three numbers you're looking for. Then select A3:F54, with A3 the
active cell. Go to Format/Conditional Formatting, select Formula Is in the 1st
dropdown, and type this for the formula

=AND(ISNUMBER(MATCH($A$1,$A3:$F3,0)),ISNUMBER(MATC H($B$1,$A3:$F3,0)),
ISNUMBER(MATCH($C$1,$A3:$F3,0)))

That all goes on one line, of course. Then select a format.

On Fri, 30 Jul 2004 16:07:00 -0500, knoertje
wrote:

As a beginner with Excel and VBA I have the following problem. I do keep
track of lottery numbers in a sheet.

Don't ask me why. It doesn't help me win a big price. There is a draw
of six numbers every week, from 1 to 45. I

keep them in six collumns. From the year 1996 to this week. I'd like to
seek combinations of numbers, say 2 or 3

numbers. If I, for example seek 3 numbers, 4-5-12 then they should show
up highlighted or coloured or whatever,

if they excist in that combination. Or else give a statement that the
combination doesn't excist.
I have tried something with conditional formating but I can't seem to
get that to do what I want. Is there

anybody who can give me a hint!!!


---
Message posted from http://www.ExcelForum.com/


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default combination of numbers in lottery

I do have the numbers in column B5 to H5, which actually make it seve
numbers. The latest numbers are inserted

in Row 5 every time, because of other formulas. So the latest is alway
on top starting in B5. The order of the

numbers in the combination I'm looking for don't matter. So my meanin
is to give Excel 2 or 3 or 4 numbers and

let Excel find if that combination of 2, 3 or 4 numbers excist. If tha
combination excist I want Excel to

highlight or color the combination in the sheet or tell me that i
excist. But if that combination doesn't

excist I want it to either do nothing or give a message or so .

The formula given don't seem to work after adjusting it to my columns

--
Message posted from http://www.ExcelForum.com

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default combination of numbers in lottery

OK. The best solution here would probably a VBA routine.
Will have a look at this later.

RBS

"knoertje " wrote in message
...
I do have the numbers in column B5 to H5, which actually make it seven
numbers. The latest numbers are inserted

in Row 5 every time, because of other formulas. So the latest is always
on top starting in B5. The order of the

numbers in the combination I'm looking for don't matter. So my meaning
is to give Excel 2 or 3 or 4 numbers and

let Excel find if that combination of 2, 3 or 4 numbers excist. If that
combination excist I want Excel to

highlight or color the combination in the sheet or tell me that it
excist. But if that combination doesn't

excist I want it to either do nothing or give a message or so .

The formula given don't seem to work after adjusting it to my columns.


---
Message posted from http://www.ExcelForum.com/




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default combination of numbers in lottery

The best solution is probably conditional formatting.

--
Regards,
Tom Ogilvy

"RB Smissaert" wrote in message
...
OK. The best solution here would probably a VBA routine.
Will have a look at this later.

RBS

"knoertje " wrote in message
...
I do have the numbers in column B5 to H5, which actually make it seven
numbers. The latest numbers are inserted

in Row 5 every time, because of other formulas. So the latest is always
on top starting in B5. The order of the

numbers in the combination I'm looking for don't matter. So my meaning
is to give Excel 2 or 3 or 4 numbers and

let Excel find if that combination of 2, 3 or 4 numbers excist. If that
combination excist I want Excel to

highlight or color the combination in the sheet or tell me that it
excist. But if that combination doesn't

excist I want it to either do nothing or give a message or so .

The formula given don't seem to work after adjusting it to my columns.


---
Message posted from http://www.ExcelForum.com/




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default combination of numbers in lottery

Tom,

OK; I am not going to argue with that.

RBS


"Tom Ogilvy" wrote in message
...
The best solution is probably conditional formatting.

--
Regards,
Tom Ogilvy

"RB Smissaert" wrote in message
...
OK. The best solution here would probably a VBA routine.
Will have a look at this later.

RBS

"knoertje " wrote in message
...
I do have the numbers in column B5 to H5, which actually make it seven
numbers. The latest numbers are inserted

in Row 5 every time, because of other formulas. So the latest is

always
on top starting in B5. The order of the

numbers in the combination I'm looking for don't matter. So my meaning
is to give Excel 2 or 3 or 4 numbers and

let Excel find if that combination of 2, 3 or 4 numbers excist. If

that
combination excist I want Excel to

highlight or color the combination in the sheet or tell me that it
excist. But if that combination doesn't

excist I want it to either do nothing or give a message or so .

The formula given don't seem to work after adjusting it to my columns.


---
Message posted from http://www.ExcelForum.com/





  #8   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default combination of numbers in lottery

in my country we have a lottery of 5 numbers out of 42.
I use Access to store the data for past draws and then
make a number of different analysis. In my opinion Access
is a better tool then a spreadsheet to keep data.

Vince


-----Original Message-----
As a beginner with Excel and VBA I have the following

problem. I do keep
track of lottery numbers in a sheet.

Don't ask me why. It doesn't help me win a big price.

There is a draw
of six numbers every week, from 1 to 45. I

keep them in six collumns. From the year 1996 to this

week. I'd like to
seek combinations of numbers, say 2 or 3

numbers. If I, for example seek 3 numbers, 4-5-12 then

they should show
up highlighted or coloured or whatever,

if they excist in that combination. Or else give a

statement that the
combination doesn't excist.
I have tried something with conditional formating but I

can't seem to
get that to do what I want. Is there

anybody who can give me a hint!!!


---
Message posted from http://www.ExcelForum.com/

.

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default combination of numbers in lottery

Unless you want to look at more than 65 thousand old
numbers, I can't see much wrong with a spreadsheet.
It all depends on what you are most familiar with.

RBS


wrote in message
...
in my country we have a lottery of 5 numbers out of 42.
I use Access to store the data for past draws and then
make a number of different analysis. In my opinion Access
is a better tool then a spreadsheet to keep data.

Vince


-----Original Message-----
As a beginner with Excel and VBA I have the following

problem. I do keep
track of lottery numbers in a sheet.

Don't ask me why. It doesn't help me win a big price.

There is a draw
of six numbers every week, from 1 to 45. I

keep them in six collumns. From the year 1996 to this

week. I'd like to
seek combinations of numbers, say 2 or 3

numbers. If I, for example seek 3 numbers, 4-5-12 then

they should show
up highlighted or coloured or whatever,

if they excist in that combination. Or else give a

statement that the
combination doesn't excist.
I have tried something with conditional formating but I

can't seem to
get that to do what I want. Is there

anybody who can give me a hint!!!


---
Message posted from http://www.ExcelForum.com/

.


  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default combination of numbers in lottery

Just wondering if after all this you got it to work, either with the
formula's or with VBA.

RBS


"knoertje " wrote in message
...
As a beginner with Excel and VBA I have the following problem. I do keep
track of lottery numbers in a sheet.

Don't ask me why. It doesn't help me win a big price. There is a draw
of six numbers every week, from 1 to 45. I

keep them in six collumns. From the year 1996 to this week. I'd like to
seek combinations of numbers, say 2 or 3

numbers. If I, for example seek 3 numbers, 4-5-12 then they should show
up highlighted or coloured or whatever,

if they excist in that combination. Or else give a statement that the
combination doesn't excist.
I have tried something with conditional formating but I can't seem to
get that to do what I want. Is there

anybody who can give me a hint!!!


---
Message posted from http://www.ExcelForum.com/




  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default combination of numbers in lottery

No, not yet. I'm busy truying to get it to work, but it does only a fe
lines of checking. And it takes a long time. But I keep trying. I wi
attach a zip file with what I have so far. I trying to choose between
or 3 or 4 number combinations. For example: I want to find out if 10 an
20 excist in combination with each other. Or if 2 and 12 and 37 exist i
combination with each other. And if they do, how often. Or even a fou
numbered combination. I don't know if it is possible in Excel, bu
that's what I had in mind. And maybe I get there someday. And by th
way.....thanks for the time and effort you have put into it

Attachment filename: testlotto.zip
Download attachment: http://www.excelforum.com/attachment.php?postid=63726
--
Message posted from http://www.ExcelForum.com

  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default combination of numbers in lottery

Don't understand.
Have tested comparing a combination of 7 numbers with 35000 other 7 number
combinations.
This took about 1.5 secs. This is on a fast computer, but still.
If you want I send you the workbook.

RBS

"knoertje " wrote in message
...
No, not yet. I'm busy truying to get it to work, but it does only a few
lines of checking. And it takes a long time. But I keep trying. I wil
attach a zip file with what I have so far. I trying to choose between 2
or 3 or 4 number combinations. For example: I want to find out if 10 and
20 excist in combination with each other. Or if 2 and 12 and 37 exist in
combination with each other. And if they do, how often. Or even a four
numbered combination. I don't know if it is possible in Excel, but
that's what I had in mind. And maybe I get there someday. And by the
way.....thanks for the time and effort you have put into it.

Attachment filename: testlotto.zip
Download attachment:

http://www.excelforum.com/attachment.php?postid=637263
---
Message posted from http://www.ExcelForum.com/


  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default combination of numbers in lottery

It would be nice to take a look at that workbook. As you understand I'
just beginning with Excel and VBA. So learning from some code is alway
a good option

--
Message posted from http://www.ExcelForum.com

  #14   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default combination of numbers in lottery

Ok, not sure though what the e-mail address is.

RBS

"knoertje " wrote in message
...
It would be nice to take a look at that workbook. As you understand I'm
just beginning with Excel and VBA. So learning from some code is always
a good option.


---
Message posted from http://www.ExcelForum.com/


  #15   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 139
Default combination of numbers in lottery

Hello RB Smissaert,

Hope you don't mind me resurrecting this August 2004, Posting from
Excelforum.com/attachment.php?postid=637263 -
regarding "combination of numbers in lottery" dated 8/7/2004. I have a
similar requirement and if you do not mind I would appreciate a copy of the
Excel spreadsheet you created for MJ - knoertje, if still available.

Thanks
Tina

"RB Smissaert" wrote:

Don't understand.
Have tested comparing a combination of 7 numbers with 35000 other 7 number
combinations.
This took about 1.5 secs. This is on a fast computer, but still.
If you want I send you the workbook.

RBS

"knoertje " wrote in message
...
No, not yet. I'm busy truying to get it to work, but it does only a few
lines of checking. And it takes a long time. But I keep trying. I wil
attach a zip file with what I have so far. I trying to choose between 2
or 3 or 4 number combinations. For example: I want to find out if 10 and
20 excist in combination with each other. Or if 2 and 12 and 37 exist in
combination with each other. And if they do, how often. Or even a four
numbered combination. I don't know if it is possible in Excel, but
that's what I had in mind. And maybe I get there someday. And by the
way.....thanks for the time and effort you have put into it.

Attachment filename: testlotto.zip
Download attachment:

http://www.excelforum.com/attachment.php?postid=637263
---
Message posted from http://www.ExcelForum.com/





  #16   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 139
Default combination of numbers in lottery

Hi Bart,

Thanks for file.
Tina


"Tina" wrote:

Hello RB Smissaert,

Hope you don't mind me resurrecting this August 2004, Posting from
Excelforum.com/attachment.php?postid=637263 -
regarding "combination of numbers in lottery" dated 8/7/2004. I have a
similar requirement and if you do not mind I would appreciate a copy of the
Excel spreadsheet you created for MJ - knoertje, if still available.

Thanks
Tina

"RB Smissaert" wrote:

Don't understand.
Have tested comparing a combination of 7 numbers with 35000 other 7 number
combinations.
This took about 1.5 secs. This is on a fast computer, but still.
If you want I send you the workbook.

RBS

"knoertje " wrote in message
...
No, not yet. I'm busy truying to get it to work, but it does only a few
lines of checking. And it takes a long time. But I keep trying. I wil
attach a zip file with what I have so far. I trying to choose between 2
or 3 or 4 number combinations. For example: I want to find out if 10 and
20 excist in combination with each other. Or if 2 and 12 and 37 exist in
combination with each other. And if they do, how often. Or even a four
numbered combination. I don't know if it is possible in Excel, but
that's what I had in mind. And maybe I get there someday. And by the
way.....thanks for the time and effort you have put into it.

Attachment filename: testlotto.zip
Download attachment:

http://www.excelforum.com/attachment.php?postid=637263
---
Message posted from http://www.ExcelForum.com/



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to calculate frequency of lottery numbers? Xray_Man New Users to Excel 24 April 3rd 23 02:10 PM
How to calculate frequency of lottery numbers? Don Guillett New Users to Excel 0 June 3rd 09 12:14 AM
Bingo Lottery Winning Numbers Nomis-MCSE Excel Discussion (Misc queries) 1 January 13th 06 07:21 PM
Checking Winning Numbers in the Lottery. Ann Excel Discussion (Misc queries) 4 May 18th 05 10:55 AM
complex validation for lottery numbers [email protected] Excel Discussion (Misc queries) 2 February 9th 05 03:15 PM


All times are GMT +1. The time now is 07:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"