By: Lutfor Rahman Shimanto

In reply to James Kaj Tulloch.

Hello JAMES

Thanks for reaching out and sharing your queries. To return the text value of two cells in different columns if they match, you can combine the EXACT, IF and ISTEXT functions.

Excel Formula: =IF(AND(ISTEXT(A2), ISTEXT(B2), EXACT(A2, B2)), A2:B2, "No Match")

So, in simpler terms, the formula checks if both cells A2 and B2 contain text and if the text in both cells is the same. If they are, it returns the values from cells A2 and B2 together. If not, it returns “No Match”.

OUTPUT:

Hopefully, the idea will help you; good luck.

Regards
Lutfor Rahman Shimanto
ExcelDemy