Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
luxbelle
 
Posts: n/a
Default 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
  #2   Report Post  
nbrcrunch
 
Posts: n/a
Default


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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"