How to check if two values are equal in Excel
In Excel, you have many formulas to help determine whether two values are equal. The DELTA function in Excel will help you do this easily.
In Excel, you have many formulas to help determine whether two values are equal. The DELTA function in Excel will help you do this easily.
What is the Delta function in Excel?
Delta is an Excel function that checks if two numerical values are equal. If they are equal, DELTA returns 1; otherwise, it returns 0.
=DELTA(number1, number2)
The DELTA function only calculates numerical values, and if number2 is empty, this Excel function defaults to 0.
How to check for equality between two values using the DELTA function.
The example below has two columns of numbers, and you want to know how many pairs of numbers are equal. Here, you would use the DELTA function to check if the numbers in each pair are equal. Then, count the number of equal pairs using the COUNTIF function. Here's how to do it:
1. Select the first cell in the column you want to check. In this example, it's cell C2.
2. In the formula bar, enter:=DELTA(A2, B2)
3. Press Enter . DELTA will now tell you whether the two numbers are equal.
4. Drag the fill bar and drop it into the box below to get the result for all the numbers.
The DELTA function checks the numbers in A2 and B2 and finds they are equal. The formula returns 1. If the two numbers are not equal, the formula returns 0.
Now you can see the pairs of equal numbers. Next, to count the number of equal pairs, you have to use the COUNTIF function. Since DELTA returns 1 to indicate each equal pair, you can have the COUNTIF function pass in the DELTA output and count the cells containing 1.
1. Select the cell where you want to display the number of pairs of equal numbers.
2. In the formula bar, enter: =COUNTIF(C2:C10, "=1").
3. Press Enter .
This formula will call COUNTIF to check cells C2 through C10 (results from the DELTA function and return a cell number equal to 1).
Above is how to check and count identical numbers in Excel. Hopefully, this article is helpful to you.
- How to copy values in Excel
- How to convert a CSV file to Excel
- How to check the version of Excel in use
- How to enter formulas in Excel
- The way to sum the same codes in Excel
- How to write fractional values in Excel
- Introducing how to use the CONVERT function in Excel in the most detail
- MINA and MAXA functions in Excel
- SUBTOTAL function: Calculates the sum of the values in a filtered list in Excel.
- MODE.MULT function - The function returns a vertical array of the most common values in Excel
- MS Excel - Lesson 5: Excel formulas and functions
- QUARTILE.EXC function - The function returns the quartile of a dataset without values 0 and 1 in Excel
- 1KB equals how many MB, GB, bytes, bits?
- BINOM.INV function - The function returns the smallest value with cumulative binomial distribution greater or equal to the standard value in Excel