How to Use the MATCH Function in Google Sheets

Video google sheet match function

Are you using Google Sheets to organize your data and looking for an efficient way to quickly find specific information? Look no further than the MATCH function in Google Sheets! This powerful function allows you to search for an item within a range of cells and return its position or display an error message if it is not found. In this article, I will show you how to use the MATCH function in Google Sheets to streamline your data search and analysis tasks.

How does the MATCH function work?

Before diving into the details of its usage, let’s understand how the MATCH function works. The MATCH function takes three parameters: the search_key, the range, and the search_type.

  • The search_key is the item you are looking for within the range of cells. It can be a simple text (“Evan”), a cell reference (like A7), or even a function that returns a string or number (like LEFT(“Mike Johnson”,8) or DATE(2017,1,1)).

  • The range is the group of cells in which the MATCH function searches for the item (search_key). It must be a one-dimensional array, either a range with a single column or a single row.

  • The search_type is an optional value that directs how the MATCH function searches for the search_key within the range. It can take three different values:

    • 1 is the default value. In this case, Google Sheets assumes that the range of cells is sorted in ascending order and returns the largest value less than or equal to the search_key.

    • 0 specifies that Google Sheets should find an exact match. This is the ideal option if the range of cells is not sorted in any particular order.

    • -1 is the exact opposite of 1. This option assumes that the range of cells is sorted in descending order and returns the smallest value greater than or equal to the search_key.

Now that we understand how the MATCH function works, let’s see how to use it in Google Sheets.

Using MATCH in Google Sheets

Take a look at the screenshot below. In column A, I have a set of data sorted in ascending order (from smallest to largest). I have tried a few variations of the MATCH function on this data.

Image

In the first example, at row 2, I asked the MATCH function to search for ID #1400 by typing =Match(1400,A2:A15,1).

The second formula, at row 3, does the same as the first one, and both tell me that ID #1400 is found on the 7th row.

The difference lies in the fact that in the first example, I used search_type 1, which is used when the data is sorted in ascending order (which is the case).

The second time, I used search_type 0, which is used when the data is not sorted or when you want an exact match only. Since the data was sorted and there was an exact match for 1400, both functions gave me the same result.

In the third example, at row 4, I ask the MATCH function to find ID #1300 by typing =Match(1300,A2:A15,0). I use search_type 0 to specify that I want an exact match. Since there is no ID #1300, I get an error.

In the fourth example at row 5, however, I ask the same thing but use search_type 1. Here, the function gives me a result, indicating that the answer is on the 4th row.

Now that you know how to use the MATCH function in Google Sheets, you can apply it to your own data to streamline your search and analysis work. Remember to experiment with different search types (search_type) to get the desired results. And don’t forget to check out Crawlan.com for more tips and tricks on Google Sheets!

Conclusion

The MATCH function is a powerful tool in Google Sheets that allows you to easily search for items within a range of cells. By using the appropriate parameters, you can obtain accurate results and speed up your data search and analysis tasks. I hope this article has been helpful in understanding how to use the MATCH function in Google Sheets. Feel free to explore this feature further and apply it to your own spreadsheets. Good luck and have fun!

Related posts