Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

MAX Function in Excel: How to Use It Correctly

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

The MAX function in Excel returns the largest value from a range of cells or a list of numbers. It is one of the simplest formulas to write: type =MAX(A1:A10) into any cell and press Enter to see the highest number in that range. It works in every modern version of Excel, including Excel for the web, and it ignores text and empty cells automatically, so you rarely need to clean your data first.

What You'll Need

  • A spreadsheet in Excel (desktop, Excel for the web, or the Excel mobile app) with at least one column or row of numbers
  • Permission to edit the file (you cannot enter a formula in a read-only sheet)
  • No add-ins, downloads, or special setup required; MAX is built in

Step-by-Step

  1. Open your workbook in Excel and click the cell where you want the result to appear. This can be any empty cell, on the same sheet or a different one.
  2. Type an equals sign followed by MAX and an opening parenthesis, so the cell shows =MAX(. Excel will usually show a small tooltip describing the function as you type.
  3. Select the range of cells you want to check by clicking and dragging over them with the mouse, or type the range manually, for example B2:B20. The formula should now read =MAX(B2:B20).
  4. To check several separate ranges, separate them with commas, for example =MAX(B2:B20, D2:D20). You can also mix in single numbers, like =MAX(B2:B20, 500), and MAX will include them in the comparison.
  5. Press Enter. The cell displays the largest value found, while the formula stays in the formula bar so you can edit it later.
  6. To reuse the formula for other rows or columns, click the result cell, then drag the small square (the fill handle) at its bottom-right corner across the cells where you want the same calculation.
  7. To see a whole column without knowing how long it is, use an open-ended reference such as =MAX(B:B), which checks the entire column B. Keep in mind that referencing a full column in thousands of formulas can slow very large workbooks.

Menu labels and tooltips can differ slightly between Excel versions and platforms, but the MAX formula itself is identical everywhere, including Google Sheets and LibreOffice Calc if you ever switch.

Common Mistakes

  • Text stored as numbers: if a value like "250" was entered as text, MAX ignores it. Look for left alignment or a small green triangle warning, then convert the cells to numbers.
  • Numbers with hidden characters: values pasted from other programs sometimes contain spaces or currency symbols, which makes them text. Use Excel's Convert to Number option or re-enter the values.
  • Dates are ignored only if stored as text. Genuine Excel dates are numbers underneath, so MAX works on them, but a text date such as "12/05/2024" typed with an apostrophe is skipped.
  • Expecting MAX to include zero-filled blanks: if your data uses 0 to mean "no value", those zeros are still counted, though they will only matter if every number is negative.
  • Forgetting that MAX returns 0 when the range contains no numbers at all, which can look like a real result. Check the range if you get an unexpected zero.
  • Typo in the range, such as =MAX(B2:B2), which checks a single cell instead of the whole column.

Tips

  • For the largest value that meets a condition, use MAXIFS instead, for example =MAXIFS(C2:C100, A2:A100, "West") to find the highest sales figure where column A says West.
  • To find the second- or third-largest value, use the LARGE function: =LARGE(B2:B20, 2) returns the second highest.
  • The smallest value works exactly the same way with MIN, and the highest and lowest k values use MAXIFS/MINIFS for conditional versions.
  • MAX ignores TRUE and FALSE logical values inside cell references, but counts them if typed directly into the formula, which is rarely what you want.
  • If you need the cell location of the maximum rather than the value itself, combine MAX with MATCH or XMATCH, for example =XMATCH(MAX(B2:B20), B2:B20), which returns the position of the largest number.

Troubleshooting

  • The formula shows as text (you see =MAX(B2:B20) in the cell): the cell was formatted as Text before you typed the formula. Change the format to General (Home tab > Number format dropdown), then double-click the cell and press Enter again.
  • You get a #VALUE! error: one of the arguments is something MAX cannot read, such as a directly typed text string. Remove it or point the formula at valid ranges only.
  • You get a #NAME? error: the function name is misspelled. Check for accidental spaces, like =MAX (B2:B20), and correct the spelling.
  • The result is 0 but you expected a number: the range likely contains only text-formatted numbers or is empty. Select the range and check the alignment; text aligns left by default.
  • The result looks too low: the range may be cutting off early. Click the formula cell and check the highlighted range outline to confirm it covers all your data.
  • The result does not update after editing data: calculation may be set to manual. Go to Formulas > Calculation Options and choose Automatic, then press F9 to recalculate.

Frequently Asked Questions

Does MAX work with dates in Excel?

Yes. Excel stores dates as numbers, so =MAX(A1:A10) on a column of dates returns the latest date. Format the result cell as a date if it initially displays as a serial number.

Can MAX handle negative numbers?

Yes. If all values are negative, MAX returns the one closest to zero, which is the largest of them. It does not skip negative values.

Does MAX include blank cells?

No. Blank and empty cells are ignored entirely, so they never lower or raise the result.

What is the difference between MAX and MAXIFS?

MAX returns the largest value in a range with no conditions. MAXIFS returns the largest value among cells that meet criteria you specify, such as a matching region or product name.

How many ranges can I put inside one MAX formula?

Up to 255 arguments, and each argument can be a large range, so practical limits are almost never an issue.

Will MAX work in Excel for the web and mobile?

Yes. The syntax is identical in Excel for the web, the Excel mobile apps, and desktop versions, so the same formula works everywhere.