Returns the most frequently occurring value (mode) in a dataset. MODE finds the value that appears most often. If multiple values tie for highest frequency, MODE returns the first one encountered. Essential for identifying most common values, frequency analysis, and understanding data distribution patterns.
Master the fundamentals of Excel MODE function
The MODE function returns the most frequently occurring value (mode) in a dataset. MODE counts the frequency of each value and returns the one with the highest count. If multiple values tie for highest frequency, MODE returns the first one encountered. If no value repeats (all unique), MODE returns #N/A. MODE ignores text values, logical values, and empty cells. Essential for frequency analysis, identifying most common values, understanding data distribution, market research, and statistical analysis. MODE is one of three measures of central tendency (along with MEAN and MEDIAN).
Returns value with highest frequency
Needs at least one repeating value
Returns first if multiple modes
Only numeric values counted
Function-specific parameters
Function-specific return type
Find most common values
Most popular choice
Understand value patterns
Mode in statistics
Exact matching required
Returns numeric position
Handles missing text gracefully
=MODE(number1, number2)First number, cell reference, or range.
Additional numbers, cell references, or ranges (up to 255 arguments).
The most frequently occurring value
Description: Returns the mode (most frequent value) of a set of numbers
Find most frequent value
Returns 20, the value that appears most often (twice). MODE finds the value with highest frequency.
Use MODE function in VBA
' Basic MODE in VBA
Range("C1").Value = Application.WorksheetFunction.Mode(Range("A1:A10"))
' Returns: Most frequent value
' Find mode
Sub FindMode()
Dim modeValue As Variant
On Error Resume Next
modeValue = Application.WorksheetFunction.Mode(Range("A1:A10"))
If Err.Number = 0 Then
Range("B1").Value = modeValue
Else
Range("B1").Value = "#N/A"
End If
On Error GoTo 0
End Sub
' Check for mode existence
Sub CheckModeExists()
Dim modeValue As Variant
Dim hasMode As Boolean
On Error Resume Next
modeValue = Application.WorksheetFunction.Mode(Range("A1:A10"))
hasMode = (Err.Number = 0)
On Error GoTo 0
If hasMode Then
Range("B1").Value = "Mode: " & modeValue
Else
Range("B1").Value = "No mode (all values unique)"
End If
End Sub
' Compare MODE with other central tendencies
Sub CompareCentralTendencies()
Dim modeValue As Variant
Dim medianValue As Double
Dim averageValue As Double
On Error Resume Next
modeValue = Application.WorksheetFunction.Mode(Range("A1:A10"))
On Error GoTo 0
medianValue = Application.WorksheetFunction.Median(Range("A1:A10"))
averageValue = Application.WorksheetFunction.Average(Range("A1:A10"))
Range("B1").Value = "Mode: " & IIf(IsError(modeValue), "#N/A", modeValue)
Range("B2").Value = "Median: " & medianValue
Range("B3").Value = "Average: " & averageValue
End Sub
' Find mode with error handling
Sub FindModeWithErrorHandling()
Dim modeValue As Variant
On Error GoTo ErrorHandler
modeValue = Application.WorksheetFunction.Mode(Range("A1:A10"))
Range("B1").Value = modeValue
Exit Sub
ErrorHandler:
Range("B1").Value = "#N/A - No mode exists"
End SubFind most common values
Most popular choice or value
Understand value patterns
Mode in statistical analysis
MODE returns #N/A
=IFERROR(MODE(A1:A10), "No mode - all values unique")Solution: MODE returns #N/A when no value repeats (all values unique). MODE requires at least one duplicate value. Check if data has duplicates. Use IFERROR or check with COUNTIF to verify duplicates exist.
MODE returns unexpected value
Use MODE.MULT for all modes, or COUNTIF to check frequenciesSolution: If multiple values tie for highest frequency, MODE returns the first one encountered. To see all modes, use MODE.MULT which returns an array. Verify frequencies with COUNTIF.
Text values not considered
MODE only works with numbersSolution: This is expected. MODE only considers numeric values. Text values are ignored. If you need to find most common text, use COUNTIF or MODE on numeric codes representing categories.
Need all modes when multiple exist
Use MODE.MULT(range) for array of all modesSolution: MODE returns only first mode when multiple exist. Use MODE.MULT to get array of all modes: MODE.MULT(range) returns all values with highest frequency.