View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Toppers Toppers is offline
external usenet poster
 
Posts: 4,339
Default Is this possible ???

Dave,
In my "solution" Row 1 will contain the numbers to be
matched. Rows 2 onwards will contain the selection of each person in the
lottery, so if there are 50 people, rows 2 to 51 will contain their numbers.

Select rows 2 to 51 (or more than 51 if you want) for 1st column and enter
the Data Validation data; repeat for other columns.

If you want to enter several weeks selection, then it will get a bit
complicated and the VBA solution offered may be better.

Good luck!

"DB" wrote:

Thanks for the info........

I'm not super experienced with Excel and this looks a bit complicated.

I'll give it a test run tomorrow though.

I will use a1 to f1
then week 2 will be b2 to f2
week 3 a3 to f3


will this still work.


Dave :)


"PCLIVE" wrote in message
...
Try using a macro.

The first line finds the last cell with data in column A. This is assumed
to be the column that will include the first of six selected numbers by a
punter. The numbers should be entered across. This code assumes that the
lottery drawn numbers are entered across the top of the spreadsheet
starting
at A1 and working over through F1. This code assumes that your punters'
numbers start at row 7. You can adjust as necessary. If a punter's
number
matches any of the numbers entered across the top, then this code colors
that cell Green. You can adjust the color. Hope you find this useful.

Sub test()
lr = Range("A65536").End(xlUp).Row

For i = 1 To 6
For Each cell In Range("A7:F" & lr)
'If n = 7 Then End
If cell.Value = Cells(1, i).Value _
Then
With cell.Interior
.ColorIndex = 4
.Pattern = xlSolid
End With
Else:
End If
Next cell
Next i

End Sub


"DB" wrote in message
. ..
My local pub runs a competition based on the National Lottery.....and the
method they are using takes ages each week.

The punter picks 6 numbers and when the lottery draw takes place each
week - any numbers that a punter has chosen are crossed off, the first
punter to have their 6 numbers crossed off wins the pot.

The pot is always won about every 8 weeks so my idea was to say have a
section at the tops of the chart to input each weeks 6 numbers.

Then below i would type in every person 6 numbers - but the clever bit I
was hoping to try and get Excel to do , would be when I enter the 6
numbers for that week I would like it to check everyones selections and
if it matches then it would "colour" the box, or some method to indicate
that it has been chosen.



Is this possible or is what i'm asking a bit to much effort.

Many thanks for your time and help.

Dave :)