Hi all,
Does anyone know how to find same value in different rows in two columns?
Here if the value in "Ref1" column in first row matches the value in "Ref2" column in second row, I will add "match" to the "Comments" column for both two rows.
The same value cannot appear in the same row.
Original:
Ref1 | Ref2 | Comments |
1234 | 5678 | |
0123 | 1234 | |
ABC | EFGH | |
XYZW | ABCDEF | |
EFGH | ABCD |
Desire result:
Ref1 | Ref2 | Comments |
1234 | 5678 | match |
0123 | 1234 | match |
ABC | EFGH | match |
XYZW | ABCDEF | |
EFGH | ABCD | match |
Solved! Go to Solution.
To find the same value in different rows in two columns, you can use a combination of Excel functions. One way to do this is by using the "IF" and "COUNTIF" functions. First, create a new column next to the two columns you want to compare. In the first cell of the new column, use the formula: "=IF(COUNTIF(A:A,B1)>0,"Match","No match")". This formula compares the value in cell B1 to the values in column A and returns "Match" if it finds a match, or "No match" if it doesn't. You can then drag the formula down the entire column to compare all the values in column B to the values in column A. This method can help you quickly identify any matching values between the two columns.