To highlight the largest number in an Excel range, select the cells, choose Home > Conditional Formatting > New Rule > Use a formula to determine which cells to format, and enter a formula that compares each cell with the range maximum. For example, with values in A2:A20, use =AND(ISNUMBER(A2),A2=MAX($A$2:$A$20)). Choose a format and confirm; every cell tied for the maximum will be highlighted.
This guide uses Excel for Microsoft 365 on Windows. The formula-based approach is useful when you want to control the range, style, and handling of ties. You can also use Excel’s built-in Top 10 Items rule for a quick setup.
What You’ll Need
- An Excel workbook with the numbers you want to compare.
- A clear range of cells to check, such as A2:A20. Leave out a column heading so Excel compares the data rather than the label.
- Permission to edit the workbook and its conditional formatting rules. If the sheet is protected, you may need the password or help from its owner.
Step-by-Step
- Identify the data range. Find the cells that contain the numbers. For example, if A1 is a heading and the values run from A2 through A20, the range is A2:A20. Include all and only the records you want included in the comparison. If you include another column by mistake, Excel may compare text or unrelated values as well.
- Select the cells to highlight. Click A2, then drag to A20, or click the Name Box to the left of the formula bar, type A2:A20, and press Enter. The selected range is where the color will appear. For a non-contiguous selection, it is generally simpler and less error-prone to create separate rules for each area.
- Open a formula-based conditional formatting rule. On the ribbon, choose Home > Conditional Formatting > New Rule. In the New Formatting Rule window, choose Use a formula to determine which cells to format. This rule checks each cell in the selection and applies formatting only when the formula is true.
- Enter a formula for the selected range. With values in A2:A20 and A2 as the top-left cell of the selection, enter
=AND(ISNUMBER(A2),A2=MAX($A$2:$A$20)). The relative reference A2 changes as Excel evaluates each cell in the selected range; the dollar signs keep the MAX range fixed. ISNUMBER prevents blank cells and text from being treated as matches. MAX finds the highest numeric value. - Choose the highlight style. Select Format in the rule window, then choose a fill color, font color, or other available formatting on the tabs in the Format Cells dialog. A pale fill with dark text is usually easy to read. Avoid a color that makes the digits difficult to see, especially if the sheet will be printed or viewed by people with color-vision differences.
- Confirm the rule. Click OK to close the Format Cells dialog, then click OK again to create the rule. Excel should immediately highlight the largest value in A2:A20. If two or more cells share that value, the formula returns TRUE for each one, so all tied maximum cells receive the format.
- Check which cells the rule applies to. If the highlight is missing or appears outside the intended range, go to Home > Conditional Formatting > Manage Rules. In Show formatting rules for, choose This Worksheet if needed. Check the Applies to range and confirm it matches your data, for example =$A$2:$A$20. Edit it if necessary, then click Apply and OK.
- Use the built-in rule as a quicker alternative. Select the data range and choose Home > Conditional Formatting > Top/Bottom Rules > Top 10 Items. Change 10 to 1, choose a format from the list or use Custom Format, and click OK. This is convenient when you want a quick top-value rule. Use the formula method when you want an explicit numeric-only test or want to be certain every tied maximum is highlighted.
- Adapt the formula if your data is elsewhere. If the values are in C5:C50, select that range and use its first cell in the formula, while keeping the maximum range fixed. With values in C5:C50, the formula is
=AND(ISNUMBER(C5),C5=MAX($C$5:$C$50)). The first reference should correspond to the top-left cell of the selected range; otherwise, the rule can shift and format the wrong cells.
On Excel for Mac, the conditional formatting commands are also on the Home tab; the New Rule dialog may be arranged differently from the Windows dialog, but choose the formula-based rule and enter the same formula. In Excel for the web, select the cells and look under Home > Conditional Formatting for the available rule options. If the formula-based option is not shown in your web version, use the desktop app to create or edit the rule. Conditional formatting created in desktop Excel can generally be viewed in the web app.
Common Mistakes
Including the heading in the selection. Select the data cells, not the column label. A heading is text and is not a meaningful candidate for the largest numeric value. If the heading is included in the Applies to range, the rule may still work, but including only the data keeps the rule clear and easier to maintain.
Using the wrong first-cell reference. In a formula rule, the cell reference without dollar signs is interpreted relative to the top-left cell in Applies to. If your selection starts at B3 but the formula starts with A2, Excel evaluates the wrong cells. Match that reference to the first selected cell, then lock the range used by MAX with dollar signs.
Forgetting to lock the maximum range. If the formula uses MAX(A2:A20) without dollar signs, Excel may adjust that range as it checks each selected cell. Use MAX($A$2:$A$20) so the comparison always uses the full intended range.
Expecting text that looks like a number to count. A value such as 250 may be stored as text after an import. ISNUMBER returns FALSE for text, and MAX ignores text in referenced cells. Convert those entries to actual numbers before relying on the highlight. A small green triangle or left-aligned numbers can be clues, but check the cell format and value rather than relying on appearance alone.
Assuming there can be only one highlighted cell. If the highest number occurs more than once, a formula comparing each value to MAX will highlight every matching cell. That is usually useful because it makes ties visible. If you need a single winner, you must decide how to break ties, such as by using a second column as a priority; a simple maximum rule does not choose one tied record.
Confusing the displayed value with the stored value. A cell formatted to show no decimal places may display 8 even when its stored value is 8.4. Excel compares the stored numbers, so 8.4 is larger than 8.1 even if both display as 8. Increase decimal places temporarily if the highlight seems unexpected.
Tips
Use a distinct but restrained fill color so the maximum is noticeable without overpowering the rest of the worksheet. If the values already use colored fills to communicate status, consider a bold font or border instead. Conditional formatting changes the appearance, not the underlying value, and it does not change the order of the rows.
For a list that will grow, check the Applies to range after adding new rows. Excel may extend a rule when you type immediately below a formatted range or when the data is in an Excel table, but do not assume it always did. Manage Rules lets you confirm exactly which cells are covered. If the range is a table, adding new records inside the table is often easier to maintain than applying the rule to a very large block of empty cells.
Keep the rule focused on one numeric column if the task is to find the largest value in that column. If you want to highlight an entire record instead, select the rows you want formatted and base the formula on the value column. For example, if each record spans A2:D20 and its score is in column C, use a row-aware rule with the score reference fixed to column C and the row left relative. This lets Excel test each row’s score while applying the format across the selected record. Check the top-left cell of the selected area carefully when setting up that kind of rule.
When you need to compare values in a filtered list, remember that MAX in the formula above checks the whole referenced range, including rows hidden by a filter. The highlight therefore identifies the largest value in the range, not necessarily the largest currently visible value. If that distinction matters, make a separate visible-only calculation or adjust the data and rule to match the comparison you actually need.
Conditional formatting is dynamic: if a value changes, Excel recalculates the maximum and moves the highlight as appropriate. You do not need to apply the rule again after ordinary edits. If the color does not update, check that calculation is set to automatic under Formulas > Calculation Options and that the edited cell is inside the rule’s Applies to range.
Troubleshooting
Nothing is highlighted. First check that the range contains at least one real number and that the formula’s first reference matches the range’s top-left cell. Then open Manage Rules and verify the Applies to range. If the entries were imported, test a cell by selecting it and checking whether Excel treats it as numeric; text-formatted numbers will not pass the ISNUMBER check.
The wrong cell is highlighted. Confirm that the MAX range includes the intended data and no unrelated values. Check for hidden rows, extra cells, or a second rule with a conflicting format. In Manage Rules, inspect the order and ranges of the rules; you can edit or remove an old rule that is coloring cells unexpectedly. Also compare the full stored values if the cells display rounded numbers.
Blank cells or labels appear colored. Confirm that you used the version of the formula containing AND(ISNUMBER(A2),…) and that A2 is the first selected cell. The ISNUMBER test is designed to exclude blanks and text. If your range contains formula results that return an empty string, the same numeric check should exclude them.
The format disappears after editing or adding data. The rule may not cover the edited cells. Open Home > Conditional Formatting > Manage Rules, select the rule, and extend Applies to to include the new data. If the rule was copied from another range, verify that its formula references also match the new top-left cell and the correct maximum range.
Excel reports a formula problem. Check that the formula begins with an equals sign and that every parenthesis is present. Use straight quotation marks only if your own formula needs text strings; the example here needs none. Excel normally uses commas between function arguments in the stated setup. Some regional settings use semicolons instead, so replace argument-separating commas with semicolons if Excel rejects a correctly structured formula because of your locale.
Frequently Asked Questions
Can Excel highlight the largest number automatically when values change?
Yes. Conditional formatting recalculates when the values change, so the highlight moves to the new maximum as long as the changed cell is within the rule’s range.
Will the rule highlight two cells if they tie for the largest value?
Yes. The formula method tests whether each cell equals the range maximum, so every numeric cell tied at that value is highlighted.
Can I highlight the largest number in a row instead of a column?
Yes. Select the row’s data cells and use a formula that compares each cell with MAX across that row. Make the formula’s first cell match the leftmost selected cell, and lock the row range if the rule needs to stay fixed.
Why does a number that looks largest not get highlighted?
It may be stored as text, or its displayed value may be rounded. Convert text entries to numbers and check the underlying values with more decimal places visible. Also make sure the cell is included in the rule.
Does the rule ignore filtered or hidden rows?
No. MAX checks the cells in its specified range even if some rows are hidden or filtered out. The rule finds the largest value in the full range, not just the visible records.
Can I remove the highlight without deleting the numbers?
Yes. Select the affected range and choose Home > Conditional Formatting > Clear Rules > Clear Rules from Selected Cells. To keep other rules on the sheet, avoid choosing the option that clears rules from the entire worksheet.
Related
- Signature Line in Word Without the X Placeholder Symbol
- Insert a Square Checkbox in Word: Symbol or Clickable Box
- Insert a Personal Signature in Word for Mac: Steps & Tips
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- How to Double Space in Word OnlineTo double-space text in Word Online, select the text—or click in a paragraph—then go to Home > Line…
- Word Booklet: Can You Make One From a Document?Yes. Microsoft Word can arrange a document as a booklet: in the desktop app, set the pages option…
- Excel Freeze Panes: Keep the First Two Columns VisibleTo keep the first two columns visible in Excel for Microsoft 365 on Windows, select cell C1, then…
- Percentile Rank in Excel: Find and Format ItTo find a value’s percentile rank in Excel, use =PERCENTRANK.INC($A$2:$A$6,B2), replacing the range with your comparison data and…
- Add Page Numbers in Microsoft Word 365To add page numbers in Word 365 on Windows, open the document, select Insert > Page Number, choose…
- How to Set Up Automatic Email Forwarding in OutlookTo automatically send incoming Outlook messages to another address, open Outlook on the web or new Outlook, go…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.