Excel Workbook | |||||||||
---|---|---|---|---|---|---|---|---|---|
C | D | E | F | G | H | I | |||
2 | Results | 7 | 8 | 9 | 25 | 41 | 49 | ||
3 | |||||||||
4 | |||||||||
5 | Lottery Numbers | ||||||||
6 | |||||||||
7 | 1 | 5 | 9 | 49 | 31 | 15 | |||
8 | 24 | 23 | 25 | 48 | 49 | 3 | |||
9 | 13 | 14 | 2 | 9 | 41 | 15 | |||
10 | 14 | 1 | 5 | 7 | 8 | 17 | |||
11 | 6 | 16 | 26 | 36 | 46 | 47 | |||
12 | 2 | 4 | 6 | 21 | 25 | 30 | |||
13 | 7 | 11 | 9 | 14 | 30 | 8 | |||
14 | 3 | 6 | 9 | 12 | 13 | 16 | |||
15 | 45 | 46 | 48 | 12 | 3 | 4 | |||
16 | 25 | 16 | 19 | 21 | 8 | 43 | |||
17 | 42 | 13 | 1 | 8 | 45 | 47 | |||
18 | 4 | 8 | 18 | 26 | 30 | 36 | |||
19 | 24 | 25 | 27 | 29 | 31 | 42 | |||
20 | 5 | 10 | 15 | 20 | 25 | 30 | |||
21 | 2 | 7 | 8 | 11 | 16 | 18 | |||
22 | 3 | 4 | 25 | 27 | 30 | 31 | |||
23 | 11 | 16 | 40 | 43 | 21 | 15 | |||
24 | 22 | 23 | 29 | 36 | 40 | 41 | |||
Sheet1 |
Excel Workbook | |||||||||
---|---|---|---|---|---|---|---|---|---|
C | D | E | F | G | H | I | |||
2 | Results | 7 | 8 | 9 | 25 | 41 | 49 | ||
3 | |||||||||
4 | |||||||||
5 | Lottery Numbers | ||||||||
6 | |||||||||
7 | 1 | 5 | 9 | 49 | 31 | 15 | |||
8 | 24 | 23 | 25 | 48 | 49 | 3 | |||
9 | 13 | 14 | 2 | 9 | 41 | 15 | |||
10 | 14 | 1 | 5 | 7 | 8 | 17 | |||
11 | 6 | 16 | 26 | 36 | 46 | 47 | |||
12 | 2 | 4 | 6 | 21 | 25 | 30 | |||
13 | 7 | 11 | 9 | 14 | 30 | 8 | |||
14 | 3 | 6 | 9 | 12 | 13 | 16 | |||
15 | 45 | 46 | 48 | 12 | 3 | 4 | |||
16 | 25 | 16 | 19 | 21 | 8 | 43 | |||
17 | 42 | 13 | 1 | 8 | 45 | 47 | |||
18 | 4 | 8 | 18 | 26 | 30 | 36 | |||
19 | 24 | 25 | 27 | 29 | 31 | 42 | |||
20 | 5 | 10 | 15 | 20 | 25 | 30 | |||
21 | 2 | 7 | 8 | 11 | 16 | 18 | |||
22 | 3 | 4 | 25 | 27 | 30 | 31 | |||
23 | 11 | 16 | 40 | 43 | 21 | 15 | |||
24 | 22 | 23 | 29 | 36 | 40 | 41 | |||
Sheet1 |
Excel Workbook | |||||||||
---|---|---|---|---|---|---|---|---|---|
C | D | E | F | G | H | I | |||
2 | Results | 7 | 8 | 9 | 25 | 41 | 49 | ||
3 | |||||||||
4 | |||||||||
5 | Lottery Numbers | ||||||||
6 | |||||||||
7 | 1 | 5 | 9 | 49 | 31 | 15 | |||
8 | 24 | 23 | 25 | 48 | 49 | 3 | |||
9 | 13 | 14 | 2 | 9 | 41 | 15 | |||
10 | 14 | 1 | 5 | 7 | 8 | 17 | |||
11 | 6 | 16 | 26 | 36 | 46 | 47 | |||
12 | 2 | 4 | 6 | 21 | 25 | 30 | |||
13 | 7 | 11 | 9 | 14 | 30 | 8 | |||
14 | 3 | 6 | 9 | 12 | 13 | 16 | |||
15 | 45 | 46 | 48 | 12 | 3 | 4 | |||
16 | 25 | 16 | 19 | 21 | 8 | 43 | |||
17 | 42 | 13 | 1 | 8 | 45 | 47 | |||
18 | 4 | 8 | 18 | 26 | 30 | 36 | |||
19 | 24 | 25 | 27 | 29 | 31 | 42 | |||
20 | 5 | 10 | 15 | 20 | 25 | 30 | |||
21 | 2 | 7 | 8 | 11 | 16 | 18 | |||
22 | 3 | 4 | 25 | 27 | 30 | 31 | |||
23 | 11 | 16 | 40 | 43 | 21 | 15 | |||
24 | 22 | 23 | 29 | 36 | 40 | 41 | |||
Sheet1 |
Option Explicit
Sub HighlightMatch()
Dim c
Application.ScreenUpdating = False
With Range("D7:I24")
.Font.FontStyle = "Regular"
.Interior.ColorIndex = xlNone
End With
For Each c In Range("D7:I24").Cells
If c.Value = [D2] Or c.Value = [E2] Or c.Value = [F2] Or c.Value = [G2] Or c.Value = [H2] Or c.Value = [I2] Then
With c
.Font.FontStyle = "Bold"
.Interior.ColorIndex = 3
End With
End If
Next
Application.ScreenUpdating = True
End Sub
Sub MatchClear()
Application.ScreenUpdating = False
With Range("D7:I24")
.Font.FontStyle = "Regular"
.Interior.ColorIndex = xlNone
End With
Application.ScreenUpdating = True
End Sub