Skip to content
xlsoffice. All Rights Reserved
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Lookup and Reference Examples

  • How to use Excel ROWS Function
  • How to get first row number in range in Excel
  • Merge tables with VLOOKUP in Excel
  • How to use Excel INDIRECT Function
  • How to create dynamic named range with OFFSET in Excel

Data Analysis Examples

  • Excel Line Chart
  • Understanding Pivot Tables in Excel
  • Excel Pie Chart
  • How to create a Histogram in Excel
  • How To Filter Data in Excel

Data Validation Examples

  • Data validation must not exist in list
  • Excel Data validation only dates between
  • Excel Data validation with conditional list
  • Excel Data validation unique values only
  • Excel Data validation don’t exceed total

nth largest value with duplicates in Excel

by

This tutorial shows how to calculate nth largest value with duplicates in Excel using the example below;

Formula

=MAX(IF(range<A2,range))

Explanation

To get the nth largest value in a data set with duplicates, you can use an array formula based on the MAX and IF functions.

Note: the LARGE function will easily return nth values, but LARGE will return duplicates when they exist in the source data.

Worked Example:   Larger of two values in Excel

In the example shown, the formula in E6 is:

=MAX(IF(range<E5,range))

Where  range is B5:B11

How this formula works

First, we get the largest value using the MAX function in E5:

=MAX(range)

Once we have the largest value established, we create another formula that simply checks all values in the named range  against the “last largest value”:

=MAX(IF(range<E5,range))

Note: this is an array formula and must be entered with control + shift + enter.

Worked Example:   Two ways to sum time over 30 minutes in Excel

Any value that is lower than the “last largest” survives the test, and any value that’s not ends up FALSE. The resulting array looks like this:

{12;FALSE;FALSE;11;12;12;10}

As the formula is copied down the column, E5 increments at each row, so that MAX and IF return a new array. The MAX function continues to return the largest value in each array — the nth value in the series.

Worked Example:   Find longest string with criteria in Excel

Post navigation

Previous Post:

nth largest value with criteria in Excel

Next Post:

nth smallest value in Excel

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others
  • How to compare two text strings in Excel
  • Two ways to Compare Text in Excel
  • How to Check If A Cell Contains Specific Text in Excel
  • UNICHAR function: Description, Usage, Syntax, Examples and Explanation
  • How to strip protocol and trailing slash from URL in Excel
  • How to show last updated date stamp in Excel
  • Get work hours between dates and times in Excel
  • DAYS360 function: Description, Usage, Syntax, Examples and Explanation
  • Series of dates by day
  • WEEKNUM function: Description, Usage, Syntax, Examples and Explanation
  • IPMT function: Description, Usage, Syntax, Examples and Explanation
  • How to calculate annual compound interest schedule in Excel
  • PRICEDISC function: Description, Usage, Syntax, Examples and Explanation
  • How to set check register balance in Excel
  • How to Calculate Tax Rates in Excel
© 2022 xlsoffice . All Right Reserved. | Teal Smiles