Google Sheets MAX Function: How to Find Highest Values
In this article
The Google Sheets MAX function allows you to identify the largest numerical value within a specific cell range or a set of individual numbers. To use it, enter =MAX(range) into a cell, where "range" refers to the group of cells you want to analyze. This function is essential for quickly identifying peak sales figures, highest test scores, or maximum temperature readings without manually scanning through hundreds of rows of data.
What You'll Need
- A Google account with access to Google Sheets.
- A dataset containing numerical values (integers, decimals, or percentages).
- A computer or mobile device with an internet connection.
Step-by-Step
- Prepare Your Data: Ensure your numbers are entered into cells and are formatted as numbers. If your numbers are formatted as "Plain Text," the MAX function may ignore them, resulting in an incorrect value of 0.
- Select the Target Cell: Click on the empty cell where you want the maximum value to be displayed. This is typically located at the bottom or the side of your data column.
- Enter the Equals Sign: Type
=to tell Google Sheets that you are starting a formula. - Type the Function Name: Type
MAXfollowed by an open parenthesis(. Your formula should now look like=MAX(. - Define the Range: You have three ways to select the numbers you want to evaluate:
- Click and Drag: While the parenthesis is open, use your mouse to click and drag across the range of cells (e.g., A2 through A50).
- Manual Entry: Type the range manually using the format
ColumnLetterRowNumber:ColumnLetterRowNumber(e.g.,B2:B100). - Individual Selection: Hold the Ctrl key (Windows) or Command key (Mac) and click individual cells that are not next to each other.
- Close the Parenthesis: Type the closing parenthesis
)to complete the function. - Execute the Formula: Press the Enter key on your keyboard. Google Sheets will instantly calculate the highest value in the specified range and display it in the cell.
Common Mistakes
One of the most frequent errors is including non-numeric data within the range. While the MAX function is designed to ignore text and empty cells, it cannot process numbers that are stored as text. If a number has a leading apostrophe or is formatted as text, the function will skip it, potentially giving you a "maximum" value that is lower than the actual highest number in your list.
Another common mistake is the "Circular Dependency" error. This happens when you place the MAX formula inside the same range it is trying to calculate. For example, if you are finding the maximum of cells A1 through A10, but you place your formula in cell A5, Google Sheets will trigger an error because the formula is trying to calculate its own value, creating an infinite loop.
Users also frequently confuse MAX with MAXA. While MAX ignores text and logical values (TRUE/FALSE), MAXA treats TRUE as 1 and FALSE as 0. If your dataset contains these logical values and you only want the highest actual number, using MAXA by mistake will lead to inaccurate results if all your numbers are between 0 and 1.
Tips
Combining MAX with other ranges: You are not limited to a single column. You can find the maximum value across multiple disjointed areas by separating ranges with commas. For example, =MAX(A2:A10, C2:C10, E2:E10) will look at three different columns and return the single highest value found among all of them.
Dynamic Ranges: If you plan to add more data to your list over time, use an open-ended range. Instead of =MAX(A2:A100), use =MAX(A2:A). This tells Google Sheets to look from cell A2 all the way to the very bottom of the sheet, regardless of how many rows you add in the future.
Finding the Second Highest Value: If you need the second or third highest value instead of the absolute maximum, use the LARGE function. The syntax is =LARGE(range, n), where n is the rank. For the second highest value, you would use =LARGE(A2:A100, 2).
Conditional Maximums: If you only want the maximum value based on a specific criteria (e.g., the highest sale in the "North" region), use the MAXIFS function. The syntax is =MAXIFS(range_to_evaluate, criteria_range, criterion). This is significantly more powerful for business reporting and data analysis.
Troubleshooting
If your MAX function is returning 0 or an unexpected result, follow these steps in order:
- Check for Text Formatting: Highlight your data range and go to Format > Number > Number. If the numbers were stored as text, this will convert them back to a numeric format that the MAX function can read.
- Verify the Range: Double-click the cell containing the formula to see the highlighted range on your sheet. Ensure that the blue box actually covers all the data you intended to include and doesn't stop short.
- Look for Hidden Rows: Remember that the MAX function counts values in hidden rows or filtered-out rows. If the result seems too high, check if there are hidden rows containing larger numbers. If you only want to find the maximum of visible cells, you will need to use a combination of the SUBTOTAL function (specifically function number 104) or a FILTER function.
- Check for Errors in the Range: If any cell within your range contains an error (like
#DIV/0!or#VALUE!), the MAX function will return that same error instead of the maximum value. You must fix the error in the source cell or use theIFERRORfunction to wrap your data. - Clear Formatting: Sometimes invisible characters or trailing spaces can interfere with how Sheets perceives a number. Use Data > Data cleanup > Trim whitespace to remove unnecessary spaces from your cells.
Frequently Asked Questions
Does the MAX function work with dates?
Yes. In Google Sheets, dates are stored as sequential numbers. Therefore, the MAX function will return the most recent date in a range, as the most recent date has the highest numerical value.
Can I use MAX with cells from different sheets?
Yes. You can reference other sheets by using the sheet name followed by an exclamation point. For example: =MAX(Sheet1!A2:A10, Sheet2!A2:A10).
What happens if the range is empty?
If the range contains no numbers, the MAX function will return 0. If the range contains only text and no numbers, it will also return 0.
Is there a limit to how many cells MAX can analyze?
While there is no specific "limit" for the MAX function itself, Google Sheets has a total cell limit per spreadsheet. As long as your range exists within the sheet's boundaries, MAX can process it.
Can MAX find the maximum value based on a color?
No, the standard MAX function cannot see cell colors or formatting. To find a maximum based on color, you would need to use a script (Google Apps Script) or create a helper column that labels the rows by category, then use MAXIFS.
How do I find the minimum value instead?
To find the lowest value in a range, use the MIN function. The syntax is identical to the MAX function: =MIN(range).