Apparently you have to buy a ticket if you want to win the lottery, so I’m out of luck. However, if you’re in an office lottery pool, or buy your own tickets for the lottery, Excel can let you know if you have a winning ticket.
Excel Knows If You Won the Lottery
Yes, Excel knows if you won the lottery — it just takes a bit of conditional formatting, and the COUNTIF function.
Highlight Other Things
You could use this technique to highlight other things too, based on a list of items to check.
For example, you could create a list of bad accounts or obsolete products, and highlight those on an Excel worksheet with product order requests.
Highlight Lottery Numbers
In this example the ticket numbers are in cells B2:G4, and the winning numbers drawn for the current lottery are entered in cells B6:G6.
Follow these steps to highlight the winning numbers in the list of tickets:
- Select the cells were the conditional formatting will be applied, B2:G4
- On the Excel Ribbon’s Home tab, click Conditional Formatting
- Click New Rule
- In the New Formatting Rule window, click Use a Formula to determine which cells to format
- For the formula, use the COUNTIF function, and refer to the active cell:
=COUNTIF($B$6:$G$6,B2) - Click the Format button.
- Select the formatting options that you want (blue fill colour, in this example), then click OK.
- Click OK
Winning Numbers Are Highlighted
After you click OK, to apply the conditional formatting, the cells with winning numbers are highlighted in blue, and other cells have no fill colour.
There are more examples of Excel conditional formatting on my main Contextures website.
Watch the Video
To see the steps for highlighting the winning lottery numbers with Excel conditional formatting, watch this short Excel tutorial video. There’s no guarantee that this will improve your odds of winning, but at least you’ll know if you do!
______________________