Forum Discussion
How to find matching values in 2 cells
- Jun 08, 2023
On reflection... In attached file see query Variant where all steps are done with Power Query User Interface
Alternative approach…
If you want to find exact matches between two cells, you can use the EXACT function in combination with the COUNTIFS function. Here is how you can modify the previous formula to include an exact match:
- Assuming your data is in columns A and B, enter the following formula in cell C1:
=IF(COUNTIFS(A:A,A1,B:B,B1,C:C,"<>")>0,"Duplicate","")
- Copy the formula in cell C1 and paste it down to the remaining rows in column C to apply the formula to the entire dataset.
The formula now includes an additional condition using the "<>" operator in the COUNTIFS function. This condition checks if there are any other rows with the same values in both A and B but different values in column C. If such rows exist, it marks the current row as "Duplicate" in column C.
This modification ensures that the match is based on exact values in cells A and B while ignoring any differences in column C.
Remember to adjust the ranges (A:A, B:B, C:C) in the formula to match the actual range of your data.