# How to use MEDIAN IF in Google Sheets

In this tutorial, you will learn how to use median if in Google Sheets.

## How to use MEDIAN IF in Google Sheets

The MEDIAN function allows users to calculate the median of a given range of values. The median refers to a number that separates the higher half and lower half of a data sample.

There may be cases where you want to calculate the median of a subset of values that meets certain criteria.

For example, let’s say you have a list of sales figures in one column, and you want to find the median of all sales figures that are greater than \$1000. You can use a combination of the MEDIAN and IF functions to quickly accomplish this.In this guide, we will show you how to create a MEDIAN IF formula in Google Sheets to calculate the median of a range of values that meets certain criteria.

## How to Perform a MEDIAN IF in Google Sheets

Here’s our step-by-step guide on how to perform a MEDIAN IF in Google Sheets.

### Step 2

Next, create an IF formula that filters your values through a specific criteria. The first argument will include the criteria itself. The second argument will be the values you wish to find the median of.

In our example, we want to find the median sales of all products in the C category.

### Step 3

We’ll use the IF formula result as our argument for the MEDIAN function.

### Step 4

Since we want the IF function to return an array, we’ll need to wrap our formula with the ARRAYFORMULA function. We can also use the Ctrl+Shift+Enter shortcut to automatically add an ARRAYFORMULA function around our formula.

In the example above, we’ve determined that the median sales for products in the C category is 280.

## Summary

This guide should be everything you need to learn how to create a MEDIAN IF formula in Google Sheets.

You may make a copy of this example spreadsheet to test it out on your own.