How to highlight winning lottery numbers in Excel worksheet?

In the article, the users are going to highlight the lottery numbers for winning in Microsoft Excel. There are the several features in the excel sheet including conditional formatting, format cells that the users have to fill any type of color according to the need. The users can use the formula for changing cell value in the new formatting rule dialog box. The users can use select the range in which you want to fill the color in any cell.

Step 1

Deliberate the excel sheet with the data. First, open the excel sheet and create the data one by one. In this sheet, type the winning lottery numbers list B1:G1, and ticket numbers randomly which the users need to highlight the winning lottery number of the ticket as shown below.

Step 2

In the excel sheet, the created data is displayed. Place the cursor in the cell B6 and select all the cells which the users inserted the ticket numbers one by one.

Step 3

After selecting all the data in the sheet, place the cursor in the ribbon. In the ribbon, there are many tabs included in the top corner. Place the cursor in the Home tab and click on the tab that has many options included. On Home tab, place the cursor and click on the drop-down menu of Conditional Formatting. On this tab, click on the New Rule tab that opens the dialog box as shown below.

Step 4

In the dialog box, there are the rules included one by one. Select and click on the rule Use a formula to determine which cells to format that enables the drop-box like this.

Step 5

In the dialog box, there is the input type and place the cursor on it. Now, enter the formula =COUNTIF($B$1:$G$1,B6)>=1 to highlight the winning tickets. In the dialog box, place the cursor and click on the Format button that opens a new dialog box Format Cells that has the Fill tab. In the dialog box of Format Cells, there are the tabs included. Now, click on the Fill tab that displays the color theme like this.

Step 6

In the dialog box, choose any color in the color theme as shown which the users want to highlight winning ticket numbers then click on the ok button that closes the dialog box of Format Cells. After closing the Format Cells dialog box, the New Formatting Rule dialog box will display as shown below.

Step 7

In the dialog box, click on the OK button that will close the New Formatting dialog box. After closing the dialog boxes, it will highlight winning tickets with the selected color from color theme randomly as shown below.

Step 8

In excel, the users have displayed the selected ticket numbers from winning list. The users have to change the winning lottery numbers that will automatically select the similar numbers within ticket rows like this.


The users utilized an easy instance to display how can highlight the winning ticket numbers from the winning lottery list randomly. The users used the necessary tabs which are included in the ribbon. The users have to practice the essential options from ribbon and modify the data according to the need.

Updated on: 12-Apr-2023


Kickstart Your Career

Get certified by completing the course

Get Started