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 have to conditionally apply a style to a cell in Excel. I know how to do it in LibreOffice calc:

=B4+STYLE(IF(ABS(B4-B3)/B4>0.07,"Red","Default"))               

How do I do it in Excel?

Excell recognizes ABS and IF -- but not STYLE. What is the analogue for STYLE in Excel?

share|improve this question

You can't do that within the formula in Excel, I assume the worksheet formula will be just

=B4

then you can use "conditional formatting" from Home tab. Use the option "use a formula to determine which cells to format" then apply a similar formula to the above, i.e.

=ABS(B4-B3)/B4>0.07

select red fill or font > OK

You can apply to a range of cells if you wish, just use the formula that applies to the top left cell of range.

My instructions assume you are using 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 .