?
Solved

Excel Conditional Statement Questionn

Posted on 2013-06-18
4
Medium Priority
?
356 Views
Last Modified: 2013-06-24
I am trying to write a conditional statement that will highlight a cell in the following scenario:

Let's say cell A1 says CYDCOR BEST BUY HSP and cell B1 says Store: CYDCOR CALL CENTER - BEST BUY, cell A2 says CYDCOR BEST BUY HSP and cell B2 says StOre: CYDCOR CALL CENTER - COSTCO.  I need the conditional statement to highlight cell B2 because it says CYDCOR CALL CENTER - COSTCO, not CYDCOR CALL CENTER - BEST BUY.
testjimmy.xlsx
0
Comment
Question by:JamesDBuskirk
4 Comments
 
LVL 12

Expert Comment

by:duttcom
ID: 39258170
You can do this by creating a new conditional formatting rule, choose "format only cells that contain", then in the dropdown at the bottom choose "Specific Text", then "not containing" in the next dropdown and then BEST BUY (with no double quotes). Set the format to whatever you want and only the sells not containing BEST BUY will be highlighted.

Conditional Format rule
0
 
LVL 81

Accepted Solution

by:
byundt earned 2000 total points
ID: 39258211
There isn't enough sample data to be sure, but...

Assuming that HSP can safely be ignored, you might consider a "formula is" criteria like:
=COUNTIF(B1,"*" & SUBSTITUTE(LEFT(A1,LEN(A1)-4)," ","*") & "*")=0

With the preceding formula, each of the words in cell A1 (except for HSP) should be present in cell B1, and in the same order. If not, then trigger the conditional formatting.
0
 
LVL 10

Expert Comment

by:Gašper Kamenšek
ID: 39258557
I would go with

=RIGHT($A1,1)<>RIGHT($B1,1)

sample
Hope it helps
0
 

Author Closing Comment

by:JamesDBuskirk
ID: 39272799
Thank you all for your help and suggestions, this worked perfectly.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

New style of hardware planning for Microsoft Exchange server.
Microsoft has changed the look and feel of Azure AD and Microsoft account sign-in pages so that you will have a more unified look and feel when moving between the two interfaces.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question