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