How do I compare a list of Lotto winning numbers to my ticket?

G

Guest

I have a list of lotto winning numbers in excel such as:

row column
a
1 11-12-13-14-15-16-17
2 18-19-20-25-29-30-34
3 25-26-27-28-29-30-40

each one of these is in its own cell on a separate row but in the same column. I wan to compare to my ticket which is in the same form e.g.:

20-30-40-50-60-70

is there a way of having excel go through the cells, find the numbers that match any number in my ticket and then copy them to another column in the same row as the original result numbers? the idea is that excel would find any number in a particular cell matching any of the numbers in my ticket and then display it in the next column, for example:


row column column
a b

1 11-12-13-14-15-16-17
2 18-19-20-25-29-30-34 20 30
3 25-26-27-28-29-30-40 30 40

in this case if it were a formula, the result would be on column b in the same rows as the ones were the comparison was taking place. Any ideas? Thanks, JJ
 
F

foolio

Dont have time to fully test it.... but basically you just need to us
the find function for every number on the winning number.... to do tha
your going to have to break up the winning number...since you have the
seperated by dashes you can use a find command on the dashes to do thi
as well...

anyways...i think i could could get it to work that way.... just pla
around with it awhile ;
 
A

AlfD

Hi!

Suppose the winning numbers are in A1:G1

Suppose your numbers are in A3:G3

Use Format > Conditional Formatting...

Formula is
=OR(A3=$A$1,A3=$B$1,A3=$C$1,A3=$D$1,A3=$E$1,A3=$F$1,A3=$G$1)

Format eg to give pattern bright green.

This "lights up" the successful numbers. Seven in a row and you won'
need us any more.

Al
 
A

AlfD

Hi!

Sorry! Forgot to mention that the conditional formatting goes in A3 t
G3.
But it could just as well be done the other way round.

Al
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top