Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Chambersteacher
 
Posts: n/a
Default Lotto Number Array

Each record in the array would correspond to a Lotto game and the columns of
the worksheet would be named "Date", "Game Number", N1, N2, N3, etc.

The objective of this is to have the game number inserted into the columns
of the winning numbers somehow automatically rather than manually.
  #2   Report Post  
Max
 
Posts: n/a
Default

Perhaps something along these lines might be close to what you're after ..

Assume the sample table below ("6/49" draw results) is
in Sheet1, cols B to H, data from row2 down

Game# N1 N2 N3 N4 N5 N6
1 14 45 9 24 22 42
2 3 5 26 49 6 36
3 4 20 11 18 6 15
4 22 24 40 28 23 21
etc

In Sheet2
-----------
Put in B1: =COLUMNS($A$1:A1)
Copy B1 across to AX1
(This will quickly create the col headers: 1 - 49)

Put in B2:
=IF(Sheet1!$B2="","",IF(ISNA(MATCH(B$1,Sheet1!$C2: $H2,0)),"",Sheet1!$B2))

Copy B2 across to AX2, fill down by as many rows as desired, say down to
AX200 ? (can copy down ahead of expected data input in Sheet1)

Sheet2 will return the Game# under the appropriate col within cols B to AX
based on the draw results in Sheet1

Alternatively, we could also have an "X" instead of the Game# entered under
the cols B to AX, and throw in some conditional formatting to colour the
cells for easier visuals

Put instead in B2:

=IF(Sheet1!$B2="","",IF(ISNA(MATCH(B$1,Sheet1!$C2: $H2,0)),"","X"))

With B2 selected,
click Format Conditional Formatting

Under condition 1, make the settings:
Formula Is: =B2="X"
Click Format button Patterns tab Light brown? OK
Click OK at the main dialog

Copy B2 across to AX2, fill down by as many rows as desired, as before

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----

"Chambersteacher" wrote:

Each record in the array would correspond to a Lotto game and the columns of
the worksheet would be named "Date", "Game Number", N1, N2, N3, etc.

The objective of this is to have the game number inserted into the columns
of the winning numbers somehow automatically rather than manually.

  #3   Report Post  
Max
 
Posts: n/a
Default

And if you want to apply the conditional formatting together with the Game#
(the 1st option), just use as the CF formula with B2 selected:

Formula Is: =B2<""

(Rest of steps are the same)

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
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
Seed numbers for random number generation, uniform distribution darebo Excel Discussion (Misc queries) 3 April 21st 23 09:02 PM
Histograms: how change number of bins [email protected] Excel Discussion (Misc queries) 2 January 31st 05 02:07 AM
How to format a number in Indian style in Excel? Victor_alb Excel Discussion (Misc queries) 2 December 21st 04 04:21 AM
Formula to list unique values JaneC Excel Worksheet Functions 4 December 10th 04 12:25 AM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 04:06 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"