Conditional formatting base on another cell (if the cell 'contains' for direct match)

Peptide

Board Regular
Joined
Apr 12, 2016
Messages
220
Hello,
I know i can do exact match formatting using the conditional formatting function, Is this possible?

Data in A1 is selected from 10 options in a pick list (i.e 128 Leslie Road or 18 Taunton Street)
I would like B1 to be highlighted (yellow is fine) if A1 contains either the word Road or Ave.

Any thoughts?

Thanks in advance,
Bob
 

Some videos you may like

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Special-K99

Well-known Member
Joined
Nov 7, 2006
Messages
8,341
Select B1

Conditional Formatting
New Rule
Use a formula to determine...

=ISNUMBER(SEARCH(" Rd",A1))+ISNUMBER(SEARCH(" Ave",A1)+ISNUMBER(SEARCH(" Road",A1))+ISNUMBER(SEARCH(" Avenue",A1))

Make sure you include the space before "Rd and "Ave" or you'll get cells highlighted for things like

Bardon Close
Havelock Street
 
Last edited:

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
52,949
Office Version
365
Platform
Windows
Use this CF formula for cell B1:
Code:
=OR(ISNUMBER(FIND("Road",A1)),ISNUMBER(FIND("Ave.",A1)))
Note that "FIND" is case-sensitive. If you do not want it to be case-sensitive, use "SEARCH" instead of "FIND".
 

Watch MrExcel Video

Forum statistics

Threads
1,095,176
Messages
5,442,835
Members
405,201
Latest member
kashyap44

This Week's Hot Topics

  • Copy entire row if CountA <>0 to another sheet
    [B]I want to copy entire row if CountA <>0 for column J7:AM7 (headers on J6:AM6) and so on till the last used cell is column D and paste the...
  • Select last used Row in Table
    I have created a Table in a Worksheet which is locked to prevent user errors and protect formula. Some of the cells require freetext entries which...
  • excel workbook: do not allow certain file name
    Hello all, Don't think this has ever been asked before, but how do I restrict file save [Before_Save Event] if the name of the file being saved...
  • fixing problem autofilter
    hello i need help about my code when i search by code in textbox it doesn't show anything this is my data [ATTACH type="full"...
  • “Weight”
    Hi, i’ve got a long sheet filled with weights such as kg,g,L & ml. i can build a formula to convert kg into g and liter into ml. How ever, my...
  • How to capitalize everything before a certain character?
    In column A, I have some text: Hello good day.mp3 Hello good day.flac etc. I'd like to capitalize everything before the period. I don't need the...
Top