In this tutorial, you will learn how to use unique if in Google Sheets.
How to use UNIQUE IF in Google Sheets
We can use a UNIQUE IF formula in Google Sheets to find all unique values in a range that fit certain criteria.
For example, let’s say you have a list of names and you want to get the number of unique names in the list that have less than 5 letters.
With a UNIQUE IF formula, you can quickly count how many unique names are in the list that fit those criteria.
Since Google Sheets does not have a built-in UNIQUE IF function, we will have to find a workaround to achieve this effect.
In this guide, we will show you how to use a UNIQUE IF formula in Google Sheets to get distinct values from a set of data that match specific criteria.
How to Perform a UNIQUE IF in Google Sheets
Here’s our step-by-step guide on how to perform a unique if in Google Sheets.
First, select an empty cell to place the output of our UNIQUE IF formula.
Ensure that there is enough space below the cell to accommodate all the results.
We’ll use the QUERY function to filter our target range based on a specific criteria. The first argument of the QUERY function will be our dataset.
The second argument will be a query where we indicate what columns to use for filtering.
In our example, we want to output all values in column A with a ‘Yes’ value in column B.
We’ll wrap our QUERY function with a UNIQUE function to remove any duplicates in our results.
This guide should be everything you need to learn how to use unique if in Google Sheets.
You may make a copy of this example spreadsheet to test it out on your own.