I have an excel worksheet and two columns. I highlight the first column if the value of the cells are less than 0.
Now how can I highlight the second column cells based on the first columns that are highlighted?
See the image below :
Now I want to make my worksheet like this image:
Best Answer
You can do it as follows (I'll assume that the
4.9755
is in cellA1
, change as applicable):Select the range of
A1
toA10
.Pull up the conditional formatting dialog and select the option that requires a formula.
Put the formula
=B1>0
and pick the formatting with font as green.Press OK and repeat for the negative values, except using
=B1<0
for the formula and the font as red for the formatting.The number formatting doesn't need conditional formatting, you can simply select the two columns and format as appropriate.
If you want to format both columns at the same time, you can select both colums and use the formula
=$B1>0
for green and=$B1<0
for red: