HomeGoogle DocsSpreadsheetConditional Large in Google Sheets

Conditional Large in Google Sheets

Published on

There is no LARGEIF function in Google Sheets. So for conditional Large in Google Sheets, you can use the IF function with Large.

You can include single or multiple conditions in Large using the IF logical function.

In the following examples I am not only going to use the IF function in Large but also there are some other interesting combinations.

You May Like: Google Sheets Functions Guide.

Different Formulas to Do Conditional Large in Google Sheets

See the Large function in use without any criteria/conditions.

Large without any criteria in Docs Sheets
=large(D2:D11,1)

Result: 890

The formula in cell F2 returns the 1st largest value (max value) in the selected range. To return the 3rd largest value, we can use the below Large formula.

=large(D2:D11,3)

Result: 764

Now let me show you how can one include one condition into the formula.

Single Criteria Large Function in Sheets

Using IF Logical Test in Large

This is a Large + IF combo as an equivalent to a non-existing ‘LARGEIF’ function.

I want to find the largest sales volume in the “North” zone. In this case, I can use the below formula.

=ArrayFormula(large(if(C2:C="North",D2:D),1))

Result: 800

Additionally, I have used the Array Formula as the IF is not an array function and we are referring to an array/range in it. The Array Formula making the IF capable of handling an array.

Using Filter in Large

As I have promised here is one more formula that you can use to find conditional large in Google Sheets. This is purely based on Large and Filter.

=large(filter(D2:D,C2:C="North"),1)

This formula first filters the sales volume for the “North” zone and then use that as the data in Large.

Multiple Criteria Large Function in Sheets

Using IF Logical Test with Multiple Conditions in Large

Here again, the IF function requires an Array Formula to work since multiple criteria are in use. If you want to know more about this, you can check this tutorial – How to Use IF, AND, OR in Array in Google Sheets.

Let me introduce the multiple criteria Large formula below. Please make a special attention to how I have included two conditions in IF.

=ArrayFormula(large(If((C2:C="North")+(C2:C="South")=1,D2:D),1))
Conditional Large in Google Sheets

The above formula returns the largest sales volume in “North” and “South” zones. How to add one more condition in the above formula?

Here is that IF Large formula with three conditions. Hope you could understand the point.

=ArrayFormula(large(If((C2:C="North")+(C2:C="South")+(C2:C="East")=1,D2:D),1))

But in multiple criteria Large, I highly recommend you to use the below Large + Filter + Regex combo which is very simple to code and read.

Using Filter Regex Combo in Large

Before going to the formula I drag your attention to one of my earlier tutorial regarding the Regex use in Filter – Regexmatch in Filter Criteria in Google Sheets [Examples].

See two examples to conditional large in Google Sheets using the powerful Large, Filter, Regexmatch combination formula.

Largest sales volume from north and south regions.

=LARGE(filter(D2:D,regexmatch(C2:C,"North|South")),1)

Largest sales volume from north, south and east regions.

=LARGE(filter(D2:D,regexmatch(C2:C,"North|South|East")),1)

That’s all about the conditional Large in Google Sheets. Enjoy!

Additional Resources:

  1. Sum Large/Max n Values Based on Criteria in Google Sheets.
  2. Extract the Largest Date in Each Group in Google Sheets [Array Formula].
Prashanth KV
Prashanth KV
Your Trusted Google Sheets and Excel Guide Prashanth KV brings a wealth of experience in Google Sheets and Excel, cultivated through years of work with multinational corporations in Mumbai and Dubai. As a recognized Google Product Expert in Docs Editors, Prashanth shares his expertise through insightful blogging since 2012. Explore his blog for practical tips and guidance on maximizing your spreadsheet skills.

Running Total By Month in Excel

This tutorial demonstrates how to calculate the running total by month in a range...

SORT and SORTBY – Excel Vs Google Sheets

While Excel offers the SORT and SORTBY functions for sorting a table, Google Sheets...

Get Top N Values Using Excel’s FILTER Function

When using the FILTER function in Excel to extract the top N values, it's...

XLOOKUP in Excel: Working with Visible Rows in a Table

In Excel, the XLOOKUP function isn't inherently designed to exclusively work with visible rows;...

More like this

Interactive Random Task Assigner in Google Sheets

You have multiple tasks and multiple people. Here's a fun way to randomly assign...

Google Sheets Bar and Column Chart with Target Coloring

To color each data point in the column or bar chart according to the...

Analyzing Column A Between Non-Adjacent Values in Column B: Google Sheets

This tutorial addresses a common scenario encountered in Google Sheets: how to sum, average,...

2 COMMENTS

  1. This is good, but not quite what I am looking for.

    I want to be able to find the highest test score of students, where they may have taken the test more than once.

    I have been using a maxifs() in each row but would like to do it as an arrayformula().

    Any suggestions?

    Cheers.

    • Hi, Steve,

      You can expect a tutorial soon. The key function will be DMAX.

      First I have to make sure that I have not written one earlier (there are 1000+ tutorials already).

      In the meantime, if possible, please make an example sheet and share that Sheet’s link via “Reply” to this thread.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.