MAX Function in Excel (Table of Contents)
MAX in Excel
Excel MAX function is categorized under statistical functions in Microsoft Excel. The Excel MAX Formula is used to find out the maximum value from a given set of data/ array. MAX function in Excel returns the highest value from a given set of numeric values.
Excel MAX formula will count numbers but ignore empty cells, text, the logical values TRUE and FALSE, and text values.
Excel MAX formula can be used to calculate the highest salary of the employee, the fastest time/score, the highest expense or revenue amount, etc.
MAX Formula in Excel
Below is the formula of MAX in Excel.
MAX formula in excel has at least one compulsory parameter i.e. number1 and rest subsequent numbers are optional.
- number1: it is required number.
- [number2]: Rest subsequent numbers are optional.
How to Use MAX Function in Excel?
MAX function in excel is very simple and easy to use. Let understand the working of MAX Function by some examples. MAX formula in Excel can be used as worksheet function and as VBA function.
MAX in Excel Example #1
In this example, we have a student database with their score details. Now we need to find out the max score from these students.
Here apply the MAX formula in Excel =MAX(C4:C19)
it will return you the max score from the given list of scores as shown in the below table.
MAX in Excel Example #2
In this example, we have a student details with their score but here some student did not have any score.
Now apply the MAX formula in Excel here =MAX(G4:G19)
MAX Function ignore the empty cells and then calculate the MAX score from the given data as shown in the below table.
MAX in Excel Example #3
Suppose, we have a student details with their score but for some of the student’s score values are Boolean.
apply the MAX formula in Excel here =MAX(J4:J19)
MAX function in Excel ignore these Boolean values cells and then calculate the MAX score from the given data as shown in the below table.
MAX in Excel Example #4
Suppose we have a list of names and we have to calculate the name with maximum length.
Here we have to apply the LEN function to calculate the length of the name.
apply the MAX formula in Excel to find out the name with maximum length.
MAX in Excel Example #5
MAX formula can be used to find the max date from the given set of dates and maximum time from the given time and can be used to find the maximum currency from the given data as shown in the below table.
MAX Function in Excel VBA
MAX Function in Excel can be used as a VBA function.
Dim Ans As Integer //declare the Ans as integer
Ans = Applicaltion.WorksheetFunction.Max(Range(“A1:B5”)) // Apply max function on range A1 to B5
MsgBox Ans //Display the max value in Message box.
Things to Remember About MAX Function in Excel
- MAX function through #VALUE! Error if any of the supplied values are non-numeric.
- MAX function on Excel will count numbers but ignore empty cells, text, the logical values TRUE and FALSE, and text values.
- If MAX function does not have any arguments than it will return the 0 as output.
MAX Excel Function Video
This has been a guide to MAX in Excel. Here we discuss the MAX Formula in excel and how to use MAX Excel function along with excel example and downloadable excel templates. You may also look at these useful functions in excel –