You are here:

Excel/If Then Statement & Conditional Formatting

Advertisement


Question
Hi Bob,

Thank you for your time.  I am trying to work out an if/then statement based upon the difference between columns K & J.  Ultimately what I would like is that based upon the outcome column L will change its fill color to either red or green.  I have tried If/then formula's and variations and I have tried conditionally formatting and variations.  Is this even possible?  See my 'formula' below:

If K>J (by 5 or more) than color L Green, If J>K (by 8 or more) than color L red.

Again, thanks so much for any help you can give.  Even if I have to do this in 2 parts and hide a column with the formula I can do that.

Pam

Answer
Select column L. Assuming L1 is the active cell, use this formula in the Conditional Formatting dialog:
=K1>=J1+5
Then click format, select green fill.
Then put in a 2nd conditional formatting formula:
=J1>K1+8
Click Format, select red fill.
That's it.
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

Excel

All Answers


Answers by Expert:


Ask Experts

Volunteer


Bob Umlas

Expertise

I`m a Microsoft Excel MVP (Most Valuable Professional) and have been since the inception of the program in 1995. I can answer every kind of Excel question except: API, Importing/exporting to other programs (powerpoint, word,...) Also check out my in-person training link at http://www.thumbtack.com/ny/new-york/excel-training/

Experience

Worked with MS Excel since version 0.99 (on the Mac!). Was contributing editor to Excellence Magazine, having written >300 articles. John Walkenbach said of me "I finally met someone who knows as much about Excel as I do."

Publications
Excellence, The Expert, Microsoft

Education/Credentials
BA in math, Hofstra University, 1965

Awards and Honors
MVP
Led sessions for the Convergence 2004-2006 seminar on Excel tips & tricks

©2016 About.com. All rights reserved.