Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

For example, if A1 and A2 are both positive, then I want A3 to be green. Also, if A1 and A2 are both negative, then I want A3 to be green as well.

Is there a way to do this? I'm using excel 2010

share|improve this question
add comment

2 Answers

You can just use conditional formatting with the following formula:

=A$1*A$2>0

To do so, select Cell A3, go to the Home tab and select Conditional Formatting > New Rule. Then select Use a formula to determine which cells to format, enter the formula above and pick up the color you want for your background.

share|improve this answer
add comment

Yes, you can use conditional formatting with an if statement.

Let me show you how. Please review the image first:

enter image description here

So, the formula in C1 is

=IF(OR(AND(A1<0, B1<0), AND(A1>0,B1>0)),"Match","")

which is copied down to C3.

Then, I select the C column and click on the Home tab -> Conditional Formatting -> New Rule.

I select Format only cells that contain

From the first drop down menu, select "No Blanks" then click the Format button. Open the Fill tab and select green (remember what green you select). Then, if you want to remove the text I suggest you open the font tab and change the font colour to the same green.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.