How to use the Match function in Excel
The Match function in Excel is a function that searches a predetermined value in a cell range and returns the relative position of the value in that range.
Match is a common function in Excel functions , which is used quite a lot when processing Excel data tables and calculations. In a data table, when you want to search for a certain value in an array, or cell range, the Match function returns exactly the position of that value in the array or in the range of the data table. .
This helps users quickly find the value they need, without having to search manually, especially with multiple tables of data that will take time. The following article will show you how to use the Match function in Excel.
The Excel function syntax is: = Match (Lookup_value, Lookup_array, [Match_type]).
Inside:
- Lookup_value: search value in Lookup_array array. This value can be a number, text, logical value, or a cell reference to a number, text, or logical value, required.
- Lookup_array: array or range of cells to be searched, required.
- Match_type: search type, not necessarily.
There are 3 types of search in Match function on Excel:
- 1 or omitted (Less than): The Match function searches for the largest value that is less than or equal to lookup_value. If the user chooses this type of search, lookup_array must be sorted in ascending order.
- 0 (Exact Match): The Match function will search for the first value exactly with lookup_value. Values in lookup_array can be sorted by any value.
- -1 (Greater than): The Match function finds the smallest value that is large or equal to lookup_value. The value in lookup_array must be sorted in descending order.
Note when using the Match function:
- The Match function returns the position of the search value in lookup_array, not returning the search value itself.
- You can use uppercase or lowercase letters while searching for text values.
- When the search value cannot be found in lookup_array, the Match function will report a search value error.
- In case the Match_type is 0 and the lookup_value search value is text, the search value may contain * (for strings) and question marks (for single characters). If you want to find a question mark or a star, type the tilde before that character.
- If you don't enter anything, the default Match function is 1.
Example 1:
We will take the example with the total table of products below.
Case 1: Search type is 1 or omitted
Search for the number 61 in the Total column in the data table, ie search for a value less than the search value. We enter the formula = = MATCH (64, C2: C6,1) .
Since the value 64 is not in the Total column, the function returns the position of the closest small value whose value is less than 64 is 63. The result will return the value in the second position in the column.
Case 2: Search type is 0
Search for the position of value 70 in the data table. We will have the input formula = MATCH (70, C2: C6,0) and press Enter.
The returned result will be the position of the value 70 in the Total column is the 4th position.
Case 3: The search type is -1
We will have the formula = MATCH (65, C2: C6, -1) as shown below.
However, because the array is not sorted in descending order, it will report an error as shown below.
Example 2:
For the student group data sheet below. Find students' class order in this data sheet, with the order given below.
The order search formula is = MATCH (D2, $ D $ 6: $ D $ 8.0) and then press Enter.
Immediately after that, the returned result will be the exact order of the students in each class, arranged according to the rules given.
The above are examples as well as detailed cases using the Match function on Excel. With this function, users can search for the exact location of the value within the search range, or rearrange the order without having to do it manually.
I wish you all success!
You should read it
- How to combine Index and Match functions in Excel
- The Match function (the function searches for a specified value in an array or cell range) in Excel
- Basic Excel functions that anyone must know
- How to use Hlookup function on Excel
- How to use the MATCH function and combine the MATCH function with the INDEX function
- How to fix the SUM function doesn't add up in Excel
- How to use the LEN function in Excel
- How to use Excel's VALUE function
May be interested
- Word 2013 Complete Guide (Part 8): Using Indents and Tabsthe previous sections we have learned about text format, page layout and text printing operations, today tipsmake.com will continue to share with you about indents and tabs - indentation and about the way of writing in word 2013. please consult!
- Practice typing 10 fingers to speed up typingsee the following 10-finger typing exercise, trying to grasp this 10-finger typing technique to ensure you will significantly improve your typing speed.
- Word 2013 Complete Tutorial (Part 9): Use Line and Paragraph Spacingwhen editing and formatting text, you'll need to pay attention to the line and paragraph spacing tool - line spacing and paragraph. below is a guide on how to stretch letters, stretch lines and stretch paragraphs on word documents 2013. invite you to consult!
- Software to read PDF filescurrently pdf is one of the most popular and widely used files such as word or excel. and to be able to open pdf files, we need specialized software to read pdf files.
- Instructions for installing and using Office 2016along with windows 10 operating system, office 2016 is the latest version of microsoft office with a beautiful graphical interface, giving users many new and exciting experiences. today, tipsmake.com will guide you how to install and use office 2016 in the article below. please consult.
- How to write notes, comments on Google Sheetson google sheets has a comment writing feature, notes in the data box can help users understand the content while working online with many people.