0

I have situation like this in excel:

Col1 Col2
3.4  1
5.6  0
4.6  0
8.7  1
10.1 0

I want to format Col1 based on values of Col2. I want to fill the background of Col1 with say green if corresponding value in Col2 is 1

I saw some examples of coloring where value>value in other cell. But none of this type.

Thanks

1

1 Answer 1

1

Here's how to do exactly what you say:

  1. Select first cell in column A.
  2. Select Conditional Formatting/New Rule.
  3. Select Classic Style conditional formatting.
  4. Choose Use a formula to determine which cells to format.
  5. Make the formula: =$B1=1
  6. Choose your formatting (as in green)
  7. Choose the Format Painter
  8. Select the column to apply the conditional formatting to all cells in that column. Applied Conditional Formatting Note: some variants in terminology and location of options between versions of Word, but the basic functionality is the same.
Sign up to request clarification or add additional context in comments.

5 Comments

Thanks. In addition, what i want is . if value =1 and greater than another col3 value then green if less then say red
You simply create: =B1>1 then green, then create a second rule on the same cell for: =B1<1 then red. The Format painter will copy both rules as you copy/past them.
Actually situation is little different. After i found the green. I want to apply new rule, that if color is green in that column i would compare the corresponding value in say col3 and want it green if greater and red if less
You use the AND() function in you condition will work for you for your second rule, it looks like: =AND(A1>1, B1<1). If that tests true, then the formatting will override the previous one.
You may have to post more info. But you may have misunderstood me... each new rule will only add to the formatting, unless it is the same kind of formatting (like background color), in which instance the last rule overrides the previous.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.