Excel: Use the comparison function
Related Videos: Compare Two Excel Lists to Spot the Differences (May 2024).
In this practical tip, we describe how to use the comparison function in Excel.
Use the comparison function in Excel
- Click in a free cell in Excel and type in "= COMPARISON".
- The comparison function syntax consists of three arguments and is displayed automatically.
- Under "Search criterion", the first argument, specify the value with which you want to compare the elements of the search matrix.
- The second argument, the search matrix, is a range of cells from, for example, result values. For example, you can use a number of numbers to find out who matches the search criteria, for example a specific number.
- As a third argument, the comparison type, enter -1.0 or 1. 1 means that the comparison function searches for the largest value that is less than or equal to the value of the search criterion. Similarly, with -1 you search for the smallest value. The 0 searches for the first value that matches the search criteria value.
- The following applies here: For the comparison type -1 or 1, the search matrix must be arranged in ascending or descending order. With comparison type 0, the values of the search matrix can be arranged in any order.
- Assign the three arguments to your cell, your cell range and the appropriate comparison type and then execute the function with the Enter key.