Home > Format > Conditional > Numbers

Highlight Numbers in Excel

Debra Dalgleish - Contextures

Use Excel conditional formatting to highlight key numbers in a list. Highlight the top few numbers, to see what's going well, or the bottom numbers, to see what needs improvement. Or, if you buy lottery tickets, quickly see which tickets have any of this week's winning numbers!

highlight the ticket numbers that have been drawn in a lottery

1) Highlight Top or Bottom Values

In these two examples, see how to highlight the:

Both examples use the same list -- the months of the year, and the quantity sold each month.

monthly sales

This video shows the steps, and the written instructions are below the video.

1A) Top 3 Values

In this example, we'll highlight the 3 highest value cells in the list of monthly sales.

The new conditional formatting rule will use the LARGE function, which has 2 arguments:

  • the list of numbers to check -- $C$2:$C$13
  • the nth largest number to return -- 3

The rule will compare each number in the selected cells (C2:C13), to see if it is greater than or equal to that nth number

  • C2>=LARGE($C$2:$C$13,3)

Follow these steps to apply the conditional formatting:

  1. Select the numbers in the Sales column (C2:C13)
  2. On the Ribbon's Home tab, click Conditional Formatting, then click New Rule
  3. In the New Formatting Rule dialog box, in the Select a Rule Type section, click Use a Formula to Determine Which Cells to Format
  4. In the formula box, enter the LARGE formula,
       =C2>=LARGE($C$2:$C$13,3)
  5. Click the Format button.
  6. Select formatting options (light green fill), click OK
  7. Click OK

highlight top 3 values

1B) Highlight Bottom X Values

In this example, we'll highlight the lowest numbers in the list of monthly sales. Instead of typing a specific number in the formula, we'll set up a cell on the worksheet, where that number can be entered. Then, the conditional formatting formula will refer to that cell.

First, set up the number cell:

  • In cell E1, type the heading: How Many?
  • In cell E2, type the number 2 -- that can be changed at any time later
  • Put a border around the 2 cells, centre horizontally, and add yellow fill colour in E2

TIP: Later, you could type a zero, to temporarily remove any highlighting

how many numbers to highlight

To highlight the bottom values, the conditional formatting rule will use the SMALL function, which has 2 arguments:

  • the list of numbers to check -- $C$2:$C$13
  • the nth smallest number to return -- a reference to cell $E$2

The rule will compare each number in the list, to see if it is less than or equal to that nth number

  • C2<=SMALL($C$2:$C$13,$E$2)

Next, follow these steps to apply the conditional formatting:

  1. Select the numbers in the Sales column (C2:C13)
  2. On the Ribbon's Home tab, click Conditional Formatting, then click New Rule
  3. Click Use a Formula to Determine Which Cells to Format
  4. In the formula box, enter the SMALL formula,
       =C2<=SMALL($C$2:$C$13,$E$2)
  5. Click the Format button.
  6. Select formatting options (light orange fill, or choose a red color), click OK
  7. Click OK

Bottom X numbers highlighted

To test the conditional formatting:

  • Type a different number in cell E2, to change the number of cells that are highlighted
  • Delete the number in cell E2, or type a zero, so that none of the numbers are highlighted

2) Highlight Lottery Numbers

You can use Excel conditional formatting to highlight the ticket numbers that have been drawn in a lottery. Winning numbers are entered on the sheet, and those numbers are highlighted in the list of purchased tickets.

Written instructions are below the video, and you can download the sample file to follow along with the video.

Highlight Lottery Numbers

You can use Excel conditional formatting to highlight the ticket numbers that have been drawn in a lottery, or the tickets that have 3 or more winning numbers.

In this example the ticket numbers are in cells C6:H8, and the drawn numbers are entered in cells C3:H3.

If a ticket cell's value is found in the cells with drawn numbers, the ticket number cell will be highlighted in green.

highlight the ticket numbers that have been drawn in a lottery

To highlight the winning numbers:

  1. Select cells C6:H8
  2. On the Ribbon's Home tab, click Conditional Formatting, then click New Rule
  3. Click Use a Formula to Determine Which Cells to Format
  4. For the formula, use the COUNTIF function:
       =COUNTIF($C$3:$H$3,C6)>=1
  5. Click the Format button.
  6. Select formatting options (green fill, in this example), click OK
  7. Click OK

To highlight the winning tickets:

  1. Select cells B6:B8
  2. On the Ribbon's Home tab, click Conditional Formatting, then click New Rule
  3. Click Use a Formula to Determine Which Cells to Format
  4. For the formula, use the SUM and COUNTIF functions:
       =SUM(COUNTIF($C6:$H6,$C$3:$H$3))>=3
  5. Click the Format button.
  6. Select formatting options (yellow fill, in this example), click OK
  7. Click OK

Get the Excel Files ✅

Get Monthly Excel Tips!

Don't miss my monthly Excel newsletter! You'll get quick tips, article links, and a bit of fun. Add your email, and click Sign Up.

Next, when you get my reply, click the Confirm button. I add this step to protect you from spam!

More Tutorials

Conditional Formatting Intro

Conditional Formatting Examples

Color Scales | Data Bars | Icon Sets

Fix Conditional Formatting Extra Rules

Conditional Formatting Multiple Cells

Conditional Formatting - Currency

Conditional Formatting Documentation

Last updated: February 24, 2026 11:18 AM