What's the Difference Between MATCH Function and XMATCH?

Xmatch Function in Excel: In this case, lookup_value represents the search term for the value and lookup_array represents the range or array that you want to look for, and match_mode defines the kind of match to be made (exact match, exact match, or the next smaller product, exactly match, or the next-largest item, or wildcard match) while search_mode defines the direction in which the search is conducted (first-to-last first, last-to-first or the binary or binary).

What is the Best Way to Utilize the XMATCH Function within Excel

What is the Best Way to Utilize the XMATCH Function within Excel

It is the Excel XMATCH function is a search and then returns the position in the form of an index. It is regarded as an easier and more robust alternative to MATCH.  function.

XMATCH is able to perform vertical as well as horizontal lookups, and can provide precise, approximate, as well as wildcard match. Additionally, it provides various advanced search options such as reverse search and the binary search (optimised to speed).

Simple use cases that require the exact match (0) You can change MATCH to XMATCH and not making any changes to the syntax.

is Match (E5 B6:B13; 0) // match to the exact

is the XMATCH (E5 B6:B13; 0.) // match exactly

You must take care when using an matches that are approximate or even wildcard. When you use these match modes, XMATCH has the following characteristics for all keys:

Match Type Match Behaviour
0 (default) Only match exactly (returns #N/A for matcH that is not present)
-1 Match exactly or follow-up smaller item
1 The exact match, or the subsequent larger item
2 Wildcard Match (*,?,~)

If we look at the match keys with MATCH that we have, the keys for approximate matches (-1 or 1) are reversed. Wildcard match is now covered by it’s own key (for MATCH, they were included by the key 0.).

Match Mode Comparison

We’ll take a examine the match-up modes using an example of the search value 518, which doesn’t meet any of the values within the lookup_array.

In the below example it is possible to observe the three match modes side-by-side by using the following formulas

is “XM” CATCH(D5 B5:B12; 0.) // Returns the error code #N/A.

Equals “XM” CATCH(D5 B5:B12; 1) // Returns next smaller index of the item

Is the XM AATCH(D5 B5:B12, 1,) // will return the the index of the next item larger

Advanced Search Modes

In contrast to the basic MATCH feature it offers a vast variety of different search options. This is a complete list of the search mode keys that you could enter to use the additional query_mode argument:

Search Mode Search Behaviour
1 (default) Find the one value
-1 Reversed search of the value of the last
2 Binary search using values that are sorted by asc.
-2 Binary search using values that are sorted in ascending order

 

The speed of binary search is superior to reversed or normal search.

However, it does require that you sort the data prior to doing so. To make a better use of XMATCH it is recommended to concentrate on normal and reversed search options (1 and one).

Certainly! This is an illustration of how you can make use of Microsoft Excel’s “XMATCH function of Microsoft Excel:

Imagine you have a listing of names, and scores. As shown below:

Name Score
Alice 85
Bob 92
Charlie 78
David 90
Emily 87

If you are looking to determine the exact position of a particular name within the list You can do this using the XMATCH function.

To find, for instance, the location in the list of “Charlie” in the list then you could make use of the following formula:

=XMATCH(“Charlie”, A2:A6, 0)

This is the case “Charlie” is the lookup value. A2:A6 represents the lookup array and 0 indicates an exact match. The function returns 3. This is the number that is “Charlie” in the list.

It is also possible to utilize the function XMATCH function to carry out partially-matched matches, reverse search as well as binary searches in addition to other functions..

What’s the Difference Between MATCH Function and XMATCH?

What's the Difference Between MATCH Function and XMATCH?

The XMATCH function functions as an enhanced version of the standard MATCH function that is available in Microsoft Excel 1. Below are the main differences between the two functions

The default behaviour default behavior: MATCH function will default to an exact match, or to the small item. The function XMATCH function is set on an exact match.

Match types of numbers This is because the Match function utilizes 1 to represent the next item that is smallest and -1 for the following biggest item. In contrast, the the XMATCH function utilizes -1 to represent the smallest next item, and -1 for the following biggest item.

Partially matches A: The function XMATCH function allows partial matches. However, the MATCH function is not able to do so..

Search in binary A: function XMATCH function is able to use an algorithm for binary searches however MATCH cannot. MATCH function can’t..

Reverse Search Reverse search: MATCH function performs reverse searches (i.e. you can search starting from the last) however MATCH cannot. MATCH function is not able to do so.

By Steven Smith

Steven Smith is a fanatical writer, blogger, and a devotee. She produces superior articles, how-tos, latest tips and tricks, and reviews. She takes pride in helping businesses through his content. When she’s not writing, she’s probably playing games and watching horror movies.