To highlight the highest number in an Excel range and keep the highlight updated when values change, select the cells, choose Home > Conditional Formatting > New Rule, and create a formula rule using =A2=MAX($A$2:$A$20) for a range in A2:A20. Choose a fill or font style and click OK. Excel will highlight every cell tied for the maximum, not just one of them.
What You’ll Need
- A workbook open in Excel for Microsoft 365 on Windows. The same kind of conditional-formatting rule is available in current Excel for Mac and Excel for the web, though the ribbon layout can look different.
- A range of cells containing the numbers you want to compare. In the instructions below, the example range is A2:A20; substitute your own range if needed.
- Permission to edit the workbook and, if you want a custom appearance, a choice of highlight color or font style.
You do not need to add a helper column or change the values in your data. Conditional formatting changes how qualifying cells look; it does not replace or reorder the underlying numbers.
Step-by-Step
- Check and identify the range. Find the cells whose values should be compared. For this example, use A2:A20, with a heading in A1. Do not include the heading in the selection: text labels are not part of the numeric comparison, and selecting only the data makes the rule easier to maintain. If your data is in another column, note its first and last data cells before continuing.
- Select the cells to format. Drag from A2 through A20, or click A2, hold Shift, and click A20. You can also click the Name Box to the left of the formula bar, type
A2:A20, and press Enter. The selected cells are the ones that can receive the highlight. If you select a larger range, Excel may format cells you did not intend to include. - Start a formula-based conditional-formatting rule. On Windows, open Home > Conditional Formatting > New Rule. In the New Formatting Rule window, choose “Use a formula to determine which cells to format.” This lets you compare each selected cell with the maximum of the entire range. Do not choose a rule that only checks whether a value is above a manually entered number; that threshold would not update automatically when the data changes.
- Enter the rule for the example range. With values in A2:A20 and A2 as the first selected cell, enter this in the formula box:
=A2=MAX($A$2:$A$20). The relative reference A2 changes as Excel checks each cell, while the dollar signs keep the range used by MAX fixed. For example, if A2:A5 contains 12, 18, 18, and 7, MAX returns 18; the comparison is TRUE for A3 and A4, so both cells qualify for formatting. The arithmetic is simply 12, 18, 18, 7 → maximum 18. - Choose how the maximum should look. Click Format in the rule window, open the Fill tab to select a background color, or use Font to choose a text color, bold style, or both. Pick a style that remains readable with the text in the cells. Click OK to close Format, then check that the formula and the selected format appear in the rule window.
- Apply the rule. Click OK again to save the conditional-formatting rule. The highest value or values in A2:A20 should now appear with your selected style. Click a different cell to remove the selection outline if it makes the fill difficult to see. The cell’s displayed value should remain unchanged.
- Test that the rule updates. Change a value in the selected range to a number higher than the current maximum. Excel should move the highlight to that cell. If you create a tie by entering the same maximum in another cell, both maximum cells should be highlighted. Undo your test entry with Ctrl+Z on Windows if you do not want to keep it; on Mac, use Command+Z.
- Confirm the range in the rule manager. If the rule does not appear on all intended cells, select a cell in the range and choose Home > Conditional Formatting > Manage Rules. In the rule manager, check that the rule’s “Applies to” field covers the complete data range, such as
=$A$2:$A$20. If you edit the range there, apply the change and close the manager.
On Mac, select the cells and use Home > Conditional Formatting > New Rule, then choose the formula-based rule option; the dialog wording and arrangement may vary slightly by Excel build. In Excel for the web, select the cells and look under Home > Conditional Formatting to add a new rule. If the web interface does not expose the formula option you need, open the workbook in the desktop app and create the rule there.
A quicker alternative is Home > Conditional Formatting > Top/Bottom Rules > Top 10 Items. Change 10 to 1, choose a format, and confirm. That rule is convenient when you want the top-ranked item. The formula method above is more explicit about comparing the maximum across a particular range, and it highlights all cells tied for that exact maximum.
Common Mistakes
- Including the header row. A text heading usually will not be treated as the maximum number, but including it can make the rule confusing and may lead to incorrect references. Select only the data cells.
- Using the wrong first-cell reference. The reference before the equals sign must match the top-left cell in the selected range. If your selection starts at B3, a rule beginning with A2 will check the wrong cells. Update the relative reference to match the selection.
- Forgetting to lock the comparison range. The dollar signs in
$A$2:$A$20keep the MAX range fixed as Excel evaluates each cell. Without them, the range can shift down the column and compare different groups instead of the full data set. - Expecting only one highlight when there is a tie. The equality test highlights every cell whose value equals the maximum. This is usually helpful because it makes ties visible. If you specifically need only one position highlighted, the rule needs a different design based on how you want Excel to break ties.
- Assuming text that looks numeric is a number. A value such as “250” stored as text may be ignored by MAX. Check whether the cell is stored as a number, and convert it if it should take part in the comparison.
- Confusing the highlight with a permanent cell fill. Conditional formatting is a rule, so its appearance can change when the values change. A manually applied fill can also interact with the visible result, so use Manage Rules to inspect the conditional rule rather than relying only on the Fill button.
Tips
- Make the rule easy to see. A pale fill with dark text often preserves readability better than a strong fill with low-contrast text. Use a style that remains distinguishable when the worksheet is printed or viewed on a different screen.
- Keep the data range consistent. If you regularly add rows, consider converting the data to an Excel table with Insert > Table. Table-based conditional formatting can extend as the table grows, but check the rule’s “Applies to” range after adding data to make sure the new rows are included.
- Separate groups when appropriate. If each department, month, or product category needs its own maximum, create a separate rule for each group or use a formula designed for the grouping. A single MAX comparison across the whole column will find one overall maximum, not a maximum per category.
- Remember that dates are numbers to Excel. Excel stores dates as serial numbers. If your selected range contains dates, MAX will identify the latest date; format the cell as a date if the value appears as a serial number.
- Use Manage Rules when several formats overlap. If more than one conditional-formatting rule applies to a cell, another rule may affect its appearance. Open Home > Conditional Formatting > Manage Rules, review the rules that apply to the selection, and adjust their order or formats if necessary.
Troubleshooting
- No cell is highlighted. Check that the range contains actual numeric values and that the formula refers to the correct first cell and full comparison range. Confirm that “Applies to” includes the selected cells. Also check that the chosen fill is not so subtle that it is hard to notice.
- The wrong cell is highlighted. Verify that the first reference in the rule matches the top-left cell of the “Applies to” range. For example, a range starting at B3 needs a relative cell reference beginning with B3, while the maximum range should cover all cells being compared. A mismatch can make Excel evaluate the wrong cell on each row.
- A value you expect to win is ignored. Select the cell and inspect its contents in the formula bar. If the number is stored as text, convert it to a number, for example by using the warning icon’s conversion option when available, or by re-entering the value. Also look for leading or trailing spaces and check whether the cell contains an error.
- The format does not move after changing a value. Make sure calculation is set to Automatic under Formulas > Calculation Options > Automatic. Then open Manage Rules and check the rule’s “Applies to” range. If the new value was entered outside that range, the rule cannot format it until you extend the range.
- Some values appear not to compare correctly. MAX ignores blank cells and text values in a referenced range, but error values can disrupt the calculation. Correct errors in the comparison range or exclude them from the range if they should not be considered. Check for hidden rows too: MAX still considers values in hidden cells unless the formula is specifically designed to ignore them.
- Another color appears instead. Open Manage Rules and inspect all rules applying to the cell. A second rule may provide a conflicting format. Adjust the rule order, remove an obsolete rule, or choose a more distinct format. If the cell has a manually applied fill, clear that direct formatting and reapply the desired appearance through the conditional-formatting rule.
Frequently Asked Questions
Will Excel highlight every cell tied for the highest number?
Yes. The formula rule checks whether each cell equals the maximum of the selected range, so all equal maximum values receive the format. In the example with two values of 18, both are highlighted.
Can I highlight the highest number in one row instead of one column?
Yes. Select the cells across that row and adjust both the first-cell reference and the MAX range to match the row. The first reference must be the leftmost selected cell, and the MAX range must cover the row values you want compared.
Does the highlight update when I change a number?
Yes. Conditional formatting recalculates as the values change, provided the changed cell is inside the rule’s “Applies to” range and Excel calculation is enabled. The highlight moves to the new maximum, or appears on additional cells if there is a tie.
Can I highlight the lowest number instead?
Yes. Create a formula-based rule using the minimum of the same range instead of its maximum. Keep the same reference pattern: the cell being checked should be relative, and the range being compared should remain fixed.
Why does Excel highlight a date as the highest number?
Dates are stored as numbers, so a date can be the maximum in a range that mixes dates and other numbers. Use a range containing only the kind of values you intend to compare, or separate dates from other measurements.
Will a new row automatically be included?
It depends on how the rule’s range is set up. A rule applied to a fixed range such as A2:A20 will not necessarily include a new row below it. After adding data, check Manage Rules or use an Excel table and verify that its conditional-formatting range expands as expected.
Related
- Insert an Empty Checkbox in Word: Easy Methods
- How to Insert Figures Into a Table of Contents in Word
- Insert an Editable Checkbox in Word: A Step-by-Step Guide
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Google Sheets Inventory Spreadsheet: Setup and TipsYes—Google Sheets can work as an inventory spreadsheet for tracking products, quantities, locations, reorder points, and stock value.…
- How to Set Out of Office in the Outlook Mobile AppTo set an out-of-office reply in Outlook mobile, open the app’s Settings, select the email account, choose Automatic…
- How to Create and Save an Email Signature in OutlookCreate a signature in Outlook by opening the signature settings for your version, adding and formatting your text,…
- Creating a Brochure in Word: A Practical GuideTo create a brochure in Microsoft Word, start with File > New and search for a brochure template,…
- Inventory Spreadsheet Template for Google SheetsFor an inventory spreadsheet, use Google Sheets rather than Google Docs: Sheets is Google’s spreadsheet app, while Docs…
- How to Eliminate Duplicates in Google Sheets QuicklyTo eliminate duplicates in Google Sheets, select the data range, then choose Data > Data cleanup > Remove…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.