Quantcast
Channel: Excel IT Pro Discussions forum
Viewing all articles
Browse latest Browse all 11829

Excel 2013 - Formula to change cell color based upon multiple criteria

$
0
0

Hi

I have been looking into creating a simple formula that I can apply to a column in Excel.  The basic functionality that I am trying to create is to shade a cell depending upon the values of two or more cells on the same work sheet.

An example is as follows;

If cell A1 contains the text "1 Hour" and cell B1 contains the text "No" then cell A1 should be filled with the colour red.

If cell A1 contains the text "1 Hour" and cell B1 contains the text "Yes" then cell A1 should be filled with the colour amber.

IF cell A1 contains the text "30 Minutes" and cell B1 contains the text "No" then Cell A1 should be filled with the colour green.  In the case of the value in A1 being 30 Minutes there is no option to have B1 as anything but No. 

Ideally I would like to do this via a formula that the in-built conditional formatting tool will accept since I am really new to VBA.  I can use conditional formatting to do this for a single cell value in A1, but I can't figure out how to work this when I introduce variables in both A1 and B1.

Any help would be really appreciated!


Viewing all articles
Browse latest Browse all 11829

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>