ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Compare cells/columns and highlight matching text strings (https://www.excelbanter.com/excel-worksheet-functions/15104-compare-cells-columns-highlight-matching-text-strings.html)

luxbelle

Compare cells/columns and highlight matching text strings
 

Hello guys,

As the thread title reads, I need to compare text strings between two
cells/columns, and highlight those that match between them.

Example:
--------------------------------
A1:
VW, GM, CHRYSLER, VOLVO, FORD

B1:
FORD, GM, MITSUBISHI, NISSAN
--------------------------------

The idea is that FORD and GM be highlighted in A1, since the
conditional formatting would find those text strings in B1. Note that
the strings in A1 and B1 will always be different, varying by row.


Thanks for reading and hope you can help me with this!


--
luxbelle

nbrcrunch


You need to have each element (car name) in its own cell. You cannot use
conditional format to selectively highlight a portion of a cell.

The FIND() function can be used to write a formula that will put a
value in an adjoining cell if criteria is found for both, but not
conditional formatting.

For example, if cell A1 contains:
Ford, Chevy, Mazda

and cell B1 contains:
Chevy, Mercedes, Accord

You could have column C be your column for finding your matches of
Chevy, column D your column for finding matches of Ford, etc.

C1 formula could be:
=IF(AND(FIND("Chevy",A1,1),FIND("Chevy",B1,1)),"Ma tch","")


--
nbrcrunch


All times are GMT +1. The time now is 03:32 AM.

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