Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm designing a shift roster and want to ensure person working in C shift (night shift) is not assigned shift A (morning shift) because it becomes a continous shift.

This means, if value of cell A12=C and B12=A then B12 should be highligted as RED.

Take example below:

Col A Col B 
C A  B C B B B B A B C A

It should throw me an error on the first and last cell of column B.

share|improve this question
Please fix your formatting, your example isn't clear. – slhck Dec 22 '12 at 9:49

Try this

Select column B then in "Home" tab select "Conditional Formatting" > New Rule > "use a formula to determine which cell to format" > in the box below type this formula


and then click "Format" button to set required format (red fill)

That will then highlight any "A" entry in column B where column A in same row = "C"

Instructions apply to Excel 2007 or later

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .