How to Use MATCH Function in Excel - Learn Excel (2024)

Excel is a widely-used software for data analysis and management. If you deal with large amounts of data on a regular basis, Excel’s MATCH function can be a powerful tool to automate and streamline your workflow. MATCH function allows you to search for a particular value or item in a list or table, and return its position or index. In this blog post, we will explore everything you need to know about using MATCH function in Excel, including the syntax, examples, and best practices.

Syntax of MATCH function in Excel

The syntax of the MATCH function in Excel is as follows:

MATCH(lookup_value, lookup_array, [match_type])

The first argument, lookup_value, is the value that you want to find within the lookup_array. The second argument, lookup_array, is one or more cells that contain the data to search. The optional third argument, match_type, specifies the type of match to be performed.

match_type options

The match_type argument can have one of the following values:

  • 0 (default) – exact match
  • 1 – approximate match (less than or equal to)
  • -1 – approximate match (greater than or equal to)

Using MATCH function for exact match

If you are looking for an exact match, use the default match_type argument, which is 0. For example, if you have a list of product names in column A and their associated prices in column B, you can use the MATCH function to find the position of a specific product name.

=MATCH(“Product A”, A1:A10, 0)

In this example, Excel will search for “Product A” within cells A1 through A10 and return the position of the cell that contains the exact match.

Using MATCH function for approximate match

If you are looking for an approximate match, use either 1 or -1 as the match_type argument, depending on whether you want to find the closest match that is less than or equal to, or greater than or equal to, the lookup_value. For example, if you have a list of GPA scores and you want to find the corresponding letter grade, you can use the MATCH function with an approximate match.

=MATCH(3.1, D1:D5, -1)

In this example, Excel will search for the value 3.1 within cells D1 through D5 and return the position of the cell that contains the closest match that is greater than or equal to 3.1.

Tips for using MATCH function in Excel

Here are some best practices to keep in mind when working with the MATCH function in Excel:

  • Make sure the lookup_array is sorted in ascending order for an approximate match.
  • If the lookup_value does not exist in the lookup_array and you are using an approximate match, the function will return a #N/A error message.
  • Use the INDEX function with the MATCH function to return the value in a specific cell based on its position.

Using MATCH function in combination with INDEX function

The INDEX function in Excel helps you return the value in a specific cell based on its position. To use the INDEX function with MATCH function, you can specify the lookup_array as the range of cells that contains the values you want to return, and the row or column number that matches the position returned by MATCH function.

For example, if you have a table of student names and their corresponding test scores, you can use the MATCH function to find the position of a specific name and then use the INDEX function to return the test score in the same row.

=INDEX(C2:C10,MATCH(“Student A”,B2:B10,0))

This formula will search for “Student A” within cells B2 through B10 and return the position of the cell that contains the exact match. The INDEX function will then return the value in the same row, but from column C instead, which is the test score associated with “Student A”.

MATCH function alternatives in Excel

While the MATCH function is a powerful tool for finding values in a list or table, there are other functions in Excel that serve similar purposes. Here are some of the alternatives:

VLOOKUP function

The VLOOKUP function is used to find specific data in a table by looking up a value in the first column of the table and returning a value in the same row.

FIND function

The FIND function is used to search for a specific character or text string within another text string and return the starting position of the match.

LOOKUP function

The LOOKUP function is used to look up values in a vector (i.e., a one-dimensional range of cells) and return a corresponding value from the same position in another vector.

The MATCH function is a valuable tool for finding values in a list or table within Excel, and it can help to streamline your workflow and automate certain tasks. With a good understanding of the syntax and options available, you will be able to use the MATCH function to its full potential.

FAQ

Here are some frequently asked questions related to using the MATCH function in Excel:

What is the main purpose of the MATCH function in Excel?

The MATCH function in Excel is used to search for a value in a list or table, and return its position or index. It is a useful tool for automating certain tasks and streamlining your workflow, especially when dealing with large amounts of data.

How do I use the MATCH function in Excel to find the position of a value in a list?

To use the MATCH function in Excel, you need to specify the value you want to find and the range of cells that contain the list of values. The function will return the position of the cell that contains a match for the specified value. You can also specify whether you want an exact match or an approximate match.

Can I use the MATCH function in combination with another function in Excel?

Yes, the MATCH function can be combined with other functions in Excel, such as the INDEX function, to return values based on a specific position. For example, you can use the MATCH function to find the position of a person’s name in a list, and the INDEX function to return their corresponding phone number.

What is the difference between an exact match and an approximate match in the MATCH function?

An exact match in the MATCH function means that the function will only return the position of the exact same value as the one you specified. An approximate match means that the function will return the position of the closest match to the specified value. You can specify whether you want an approximate match that is less than or equal to, or greater than or equal to, the specified value.

What are some best practices for using the MATCH function in Excel?

Some best practices for using the MATCH function in Excel include sorting the lookup_array in ascending order for an approximate match, using the INDEX function with the MATCH function to return values based on position, and being mindful of error messages that may occur if the specified value cannot be found in the lookup_array.

How to Use MATCH Function in Excel - Learn Excel (2024)

FAQs

How to Use MATCH Function in Excel - Learn Excel? ›

The MATCH function searches for a specified item in a range of cells, and then returns the relative position of that item in the range. For example, if the range A1:A3 contains the values 5, 25, and 38, then the formula =MATCH(25,A1:A3,0) returns the number 2, because 25 is the second item in the range.

How to use the match formula in Excel? ›

Examples of using the MATCH function in Excel

To find a value that matches or is the next closest value that's lower than "2", you can type the functions as:=MATCH(2, A1:A4, 1)=XMATCH(2, A1:A4, -1)Note the value for the last one is different between the two functions because they use different rules.

How do you use the text match function in Excel? ›

Select a new cell as your lookup cell. Here, you will write down your target element. Select the cell next to it and include the MATCH function. Provide the details or parameters needed by the MATCH function to carry out the index matching operation.

How to check data in Excel if match? ›

IF Formula: =IF(A2=B2,”Match”,” ”)

Using the IF formula, we will compare two columns in Excel, columns A and B. We will be using the formula: “=IF(A2=B2, “Same car brands,” “Different car brands”).” If the values match, this formula will return “Same car brands” for every “true” value.

How do I use the match function in Excel VLOOKUP? ›

In its simplest form, the VLOOKUP function says: =VLOOKUP(What you want to look up, where you want to look for it, the column number in the range containing the value to return, return an Approximate or Exact match – indicated as 1/TRUE, or 0/FALSE).

How do I compare two lists in Excel to find matches? ›

Use the formula “=IF(A1=B1, “Match”,”Not a match”)" to test if the cell in A1 is the same as B1, replacing the references to match your own data. Press the “Enter” key or select another cell to apply the formula. Identify whether your cell reads “Match” or “Not a match”, depending on the data in cells A1 and B1.

What is the formula for matching cells in Excel? ›

The formula is =IF(AND(A2=B2, A2=C2), “Full match”, “”). And the formula to find matches in any two cells in the same row is =IF(OR(A2=B2, B2=C2, A2=C2), “Match”, “”).

How to match two columns in Excel? ›

You can compare two columns using the IF condition in Excel. The formula to compare two columns is =IF(B4=C4,”Yes”,” ”). It returns the result as Yes against the rows that contain matching values, and the remaining rows are left empty.

How to match names in Excel? ›

How to Use the MATCH Formula
  1. Type “=MATCH(” and link to the cell containing “Kevin”… the name we want to look up.
  2. Select all the cells in the Name column (including the “Name” header).
  3. Type zero “0” for an exact match.
  4. The result is that Kevin is in row “4.”

How do I know if two data sets match in Excel? ›

To check if two sets of data match, you can use the IF and COUNTIF functions together. For instance, use =IF(COUNTIF(B:B, A1)>0, “Match”, “No Match”) to see if each value in List A is present in List B. This will return “Match” or “No Match” accordingly.

How do you use match () Excel? ›

The MATCH function searches for a specified item in a range of cells, and then returns the relative position of that item in the range. For example, if the range A1:A3 contains the values 5, 25, and 38, then the formula =MATCH(25,A1:A3,0) returns the number 2, because 25 is the second item in the range.

Why use match instead of VLOOKUP? ›

INDEX/MATCH is more secure because you can't change the column to be shown as you can in a VLOOKUP range. INDEX/MATCH is also structurally better because moving columns around won't break. VLOOKUP could show something completely different.

How to match words in Excel? ›

Excel formula to search for a matching word in a word string across multiple cells
  1. take the name (or separate words) from column 1.
  2. search across column 2 for any matching WORD (not the full name! ...
  3. If a match exists, put the content of column A in column C (next to matching entry in column B).
Apr 24, 2024

What is the formula for matching cell in Excel? ›

The formula is =IF(AND(A2=B2, A2=C2), “Full match”, “”). The formula to find matches in any two cells in the same row is =IF(OR(A2=B2, B2=C2, A2=C2), “Match”, “”).

How do you do a conditional match formula in Excel? ›

Formulas to compare values (numbers and text)
ConditionFormula example
Greater than or equal to=$B2>=10
Less than=$B2<10
Less than or equal to=$B2<=10
Between=AND($B2>5, $B2<10)
3 more rows
Aug 24, 2023

How to match data in Excel from 2 sheets? ›

You just need to select a column where you want to put the matching data and enter the following formula: =MATCH(B2,Sheet1! B2:B6,0). This formula will return the row number of the matching value in Sheet1, or an error if there is no match.

How to check if a cell contains specific text in Excel? ›

Find cells that contain text

On the Home tab, in the Editing group, click Find & Select, and then click Find. In the Find what box, enter the text—or numbers—that you need to find. Or, choose a recent search from the Find what drop-down box. Note: You can use wildcard characters in your search criteria.

References

Top Articles
Latest Posts
Recommended Articles
Article information

Author: Mrs. Angelic Larkin

Last Updated:

Views: 6436

Rating: 4.7 / 5 (67 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Mrs. Angelic Larkin

Birthday: 1992-06-28

Address: Apt. 413 8275 Mueller Overpass, South Magnolia, IA 99527-6023

Phone: +6824704719725

Job: District Real-Estate Facilitator

Hobby: Letterboxing, Vacation, Poi, Homebrewing, Mountain biking, Slacklining, Cabaret

Introduction: My name is Mrs. Angelic Larkin, I am a cute, charming, funny, determined, inexpensive, joyous, cheerful person who loves writing and wants to share my knowledge and understanding with you.