XMATCH Function Explained
The XMATCH
function in Microsoft Excel is used to look up a value in a range of cells and return the relative position of that value in the range. It can be used with either exact or approximate matches. It takes three arguments: lookup_value
, lookup_array
, and match_type
. The lookup_value
is the value to be found in the lookup_array
. The match_type
argument is used to specify whether an exact or approximate match is desired. If an exact match is desired, the match_type
argument should be set to 0. If an approximate match is desired, the match_type
argument should be set to 1. The XMATCH
function will return the relative position of the lookup_value
in the lookup_array
.
XMATCH Function Syntax
XMATCH(lookup_value, lookup_array, [match_type])
- lookup_value: The value to be found in the lookup_array.
- lookup_array: The range of cells to be searched for the lookup_value.
- match_type: (Optional) The type of match to be performed. Can be either 1 (exact match) or -1 (approximate match). If omitted, the default is 1.