ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   matching texts in 2 columns (https://www.excelbanter.com/excel-worksheet-functions/231044-matching-texts-2-columns.html)

my_melody

matching texts in 2 columns
 
Can I match texts in 2 columns (one column has a longer string than the other
column so let's say it should be able to match the first 5 characters) and
then highlight the ones that have no matches...

Jacob Skaria

matching texts in 2 columns
 
Suppose in Col A you have the data..and
B1 enter a text mathcing with one of the entries in Col A

The below formula in C1 will check for the first 5 characters of B1 in ColA
and return "No match" if a match is not found. If a match is found formula
will return blank

=IF(ISERROR(MATCH(LEFT(B1,5) & "*",A:A,0)),"No Match","")
--
If this post helps click Yes
---------------
Jacob Skaria


"my_melody" wrote:

Can I match texts in 2 columns (one column has a longer string than the other
column so let's say it should be able to match the first 5 characters) and
then highlight the ones that have no matches...



All times are GMT +1. The time now is 07:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com