ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Excel Macro for colouring cells (https://www.excelbanter.com/excel-discussion-misc-queries/98921-excel-macro-colouring-cells.html)

Flash

Excel Macro for colouring cells
 
Hi

I would like to colour a sum cell - ie forecast less Actual

if the Actual is greater than forecast 105% I want the cell to be red

if the Actual is less than forecast < 95% I want the cell to be green

if the actual v forecast is close - between 95% and 105% then the cell
should be white

if someone can help we with this it would be great. Thanks


SR

Excel Macro for colouring cells
 
not good at macro but you can do it by using option Format/conditional
formatting. this one limits to max 3 conditions.
--
sr


"Flash" wrote:

Hi

I would like to colour a sum cell - ie forecast less Actual

if the Actual is greater than forecast 105% I want the cell to be red

if the Actual is less than forecast < 95% I want the cell to be green

if the actual v forecast is close - between 95% and 105% then the cell
should be white

if someone can help we with this it would be great. Thanks



JLatham

Excel Macro for colouring cells
 
SR has pointed you in what is probably the best direction - use Conditional
Formatting (under Format in the menu bar) you'll only need to set 2
conditions, in either order,
set one for Value is Less Than (or less than or equal to) 95% choose green
color
set second one for Value Greater Than (or GT or equal to) 105% choose red
color
this leaves you with all other conditions (between 95-105) with the cells
displayed in normal color.
In the area where you enter the parameter, be sure to enter .95 and 1.05

But empty cells will be colored when no value has been calculated in them.


"Flash" wrote:

Hi

I would like to colour a sum cell - ie forecast less Actual

if the Actual is greater than forecast 105% I want the cell to be red

if the Actual is less than forecast < 95% I want the cell to be green

if the actual v forecast is close - between 95% and 105% then the cell
should be white

if someone can help we with this it would be great. Thanks




All times are GMT +1. The time now is 03:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com