How to highlight a matching cell from a set of results for a lottery spreadsheet

johno17

New Member
Joined
Jun 9, 2008
Messages
5
Hi, I am trying to set up a lottery spreadsheet, where I enter the results and matching numbers would be highlighted
Any help would be appreciated

Thanks in advanced
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
for those not in the UK, its a minimum of 7 numbers (for Lotto) range 1 to 49, and normally no duplicates
 
Upvote 0
Excel Workbook
ABCDEFGHIJ
1
2Results789254149
3
4
5Lottery Numbers
6
7159493115
824232548493
91314294115
1014157817
1161626364647
12246212530
13711914308
14369121316
154546481234
1625161921843
174213184547
184818263036
19242527293142
2051015202530
21278111618
223425273031
23111640432115
24222329364041
25
Sheet1
 
Upvote 0
To highlight, use conditional format. The condition for cell D7 is set up for Cell value, is equal to, =D$2. Copy formats over and down. You can use an array formula to count how many numbers match on each line, see below. The formula is entered without the { } curly brackets, then confirmed by hitting Control + Shift + Enter instead of just Enter.
Book1
BCDEFGHIJ
1
2Results789254149
3
4
5Lottery Numbers
6Matches
71159493115
8024232548493
911314294115
10014157817
11061626364647
120246212530
132711914308
141369121316
1504546481234
Sheet1
 
Upvote 0
You can do that like this

Select D7:I24

Use Format > Conditional formatting and use "formula is" from the dropdown and enter this formula

=MATCH(D7,$D$2:$I$2,0)

Select required formatting > OK
 
Upvote 0
one thing I didn't see from the samples is highlighting cells that are not in the same column but are equal to one of the 7 header numbers
 
Upvote 0
Barry's formula gives you credit for any of your numbers matching any of the results numbers, regardless of order; my formula only gives you credit if your nth number matches the nth result number. How is your Lotto set up?
 
Upvote 0
values in G9, G10, H10 and I13 all need to be captured. mimimum is 2 exact matches to a full line, and pays on those computations
 
Upvote 0

Forum statistics

Threads
1,225,889
Messages
6,187,677
Members
453,435
Latest member
U4US

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top