## 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 formulaExcel MAX FormulaThe MAX Formula in Excel is used to calculate the maximum value from a set of data/array. It counts numbers but ignores empty cells, text, the logical values TRUE and FALSE, and text values.read more 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 for MAX in Excel.

MAX formula in excel has at least one compulsory parameter, i.e., number1, and the rest of subsequent numbers are optional.

**Compulsory Parameter:**

**number1**it is the required number.*:*

**Optional Parameter:**

**[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 us understand the working of the MAX Function by some examples. MAX formula in Excel can be used as a worksheet function and as a VBA functionVBA FunctionVBA functions serve the primary purpose to carry out specific calculations and to return a value. Therefore, in VBA, we use syntax to specify the parameters and data type while defining the function. Such functions are called user-defined functions.read more.

### 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 student details with their score, but here some students did not have any score.

Now apply the MAX formula in Excel here =MAX(G4:G19)

MAX Function ignores the empty cells and then calculates the MAX score from the given data, as shown in the below table.

### MAX in Excel Example #3

Suppose we have student details with their score, but some of the student’s score values are Boolean.

apply the MAX formula in Excel here =MAX(J4:J19)

MAX function in Excel ignores these Boolean values cells and then calculates 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.

Sub Maxcal()

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 the Message box.

End Sub

**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 the MAX function does not have any arguments, then it will return the 0 as output.

### MAX Excel Function Video

### Recommended Articles

This has been a guide to MAX in Excel. Here we discuss the MAX Formula in excel and how to use the MAX Excel function along with excel example and downloadable excel templates. You may also look at these useful functions in excel –

- MEDIAN Formula in Excel
- COUNTIF Formula in Excel
- Median Formula
- Max IF Formula in Excel
- VLOOKUP on Different Sheets

- 35+ Courses
- 120+ Hours
- Full Lifetime Access
- Certificate of Completion

Johan says

Thanks I got an answer to my ?