The Match function (the function searches for a specified value in an array or cell range) in Excel
The Match function is a fairly common function, applied a lot in the process of calculating and processing data on Excel spreadsheets. The Match function helps you search for a specified value in an array, a range of cells, and then returns the position of the value in the array or range.
The following article introduces the syntax and usage of the Match function in Excel.
Description
The MATCH function searches for a specified value in an array or range of cells, and the result is the relative position (or sequence number) of the value in that array or range.
Syntax
= MATCH (lookup_value, lookup_array, match_type)
Inside:
- lookup_value: the value you want to look for in the array (lookup_array), this value can be a number, text or logical value or a cell reference to a number, text or logical value.
- lookup_array: array, range of cells to be searched.
- match_type: search type, there are 3 types of search are -1, 0, 1.
1 or ignore (Less than): The MATCH function searches for the maximum value that is less than or equal to lookup_value. If this type of search is selected, lookup_array must be sorted in ascending order.
0 (Exact match): The MATCH function searches for the first value by exactly lookup_value and the values in lookup_array can be sorted in any order.
-1 (Greater than): The MATCH function searches for the smallest value that is greater than or equal to lookup_value. Values in lookup_array must be sorted in descending order.
Note
- The MATCH function returns the position of the search value in lookup_array, not the search value itself.
- Do not distinguish between uppercase and lowercase letters when looking for text values.
- If no lookup value is found in lookup_array, MATCH will return an error value.
- If match_type is 0 and the lookup_value search value is text, can the search value contain asterisks * (suitable for any string of characters) and a question mark? (matches any single character). And if you want to find a question mark or asterisk, type the tilde ~ before the character.
For example
For the data sheet:
The search type is 1 or omitted, for example, searching for position 64 in the Total column :
= MATCH (64, C6: C9,1)
Because the value 64 is not in the Total column, the function will return the position of the largest value that is less than 64 (63) and the result is as follows:
The search type is 0, for example, find the position of 65 in the Total column :
= MATCH (65, C6: C9,0)
The search type is -1, for example: = MATCH (65, C6: C9, -1) and the error results because arrays are not sorted in descending order.
The way to use the Match function is quite simple, with different processing and calculation requirements, you can combine the Match function with some other functions in Excel to process data more efficiently. Good luck!
You should read it
- How to use the Match function in Excel
- LOOKUP function searches in Excel
- Match function in Excel - Usage and illustrative examples
- GEOMEAN function - The function returns the average of a positive array or range of data in Excel
- MODE.MULT function - The function returns a vertical array of the most common values in Excel
- MODE.SNGL function - Function that returns the most frequently occurring, or the most repeated values in an array or data range in Excel
- INDIRECT function in Excel - How to use INDIRECT function and examples using INDIRECT function
- Instructions for using Index function in Excel
- How to use COUNTIF function on Excel
- Look up data in Excel tables: Replace VLOOKUP with INDEX and MATCH
- How to use the SUMIF function in Excel
- The range () function in Python
Maybe you are interested
AMD has surpassed Intel in brand value
SQL way to count NULL and NOT NULL values in a column
Comparing Odroid-N2+ and Raspberry Pi 4: Which option offers better value?
How to receive free gifts from IObit with a total value of nearly 150,000 USD
Write a program to find duplicate values in Python
Write a program to check duplicate values in Python