# Formula To Change Cell Colour :: Shade A Cell Depending On Condition

Feb 9, 2007

Is it possible to use a formula to shade a cell dependent on a condition? I have tried an if formula (see below) but it is incorrect. =if('November 2006 SVOC'!B6>'March 2006 SVOC'!C6,'November 2006 SVOC'!B6 [red],if('November 2006 SVOC'!B6<'March 2006 SVOC'!C6,'November 2006 SVOC'!B6 [blue],))

## Excel 2010 :: Change Cell Colour Depending On Date In Another Cell

Jan 9, 2013

I am trying to create a sheet in XL 2010.

In Column A each cell will contain a date (differnet from other cells in that column) when inspection was last done.

Column B is when the weekly inspection is due.

Column C is when bi-weekly inspection is due.

Column D is when monthly inspection is due.

Column E is when 6 monthly inspection is due.

I need a formula to change the colour of cells B, C, D & E when each inspection is due depending on the date entered in A

I am hoping its possible that the cell colour can stay for 2 days after the due date and then return back to blank after the second day.

For example if cell A1 has a date of January 1 2013 then on January 8 2013 cell B1 turns red then on January 10 2013 the cell returns back to normal.

A1
B1
C1
D1
E1

Inspection Date
Weeekly Due
Bi-WeeklyDue
Monthly Due
6 Monthly Due

January 1 2013
Change red Jan 8 & return blank Jan 10
Change red Jan 15 & return blank Jan 17
Change red Feb 1 & return blank Feb 3
Change red June 1 & return blank June 3

## Can Change Colour In A Cell Depending On Result

Jun 3, 2013

Is there any way to have a cell change its colour depending on whether a condition is met. E.G., can i have it as green if the result is a plus number and red if its a negative?

## How To Change A Cell Colour Depending An A Different Cells Value

Oct 22, 2009

How to a change a cell colour to say red in B6 if cell b12 = 1 and if e6 = 1 to change to green. I thought I might be able to use conditional formatiing but no. I had set the spread sheet to do a cell just for a condition representing a sum from another worksheet and it was working fine but i have to incorporate the two together and am stock.

I have attached a spread sheet.

## VBA-change The Colour Of 4 Cells Depending On The One Cell

May 20, 2009

i need to change the colour of 4 cells depending on the one cell.

i have found some vba codes on the net but they are all based on numbers and i need it on text.

so if a1 ="alert" make A1 to A4 red

if a1="passed" make a1 to a4 green... and so on

i cant used conitional formatting as i need more than 3 colours

## Change Object Colour And Rotation Depending On Cell Value

Apr 11, 2014

I would like to conditional format an Object depending on the variance between 2 weeks.

If the value is > than 0% the arrow is Green and points upwards.
If the value is = to 0% the arrow is Yellow and points at at 90 degree to the left.
If the value is < than 0% the arrow is Red and points downwards.

Attached is a sample : rrow Conditional Format.xlsm‎

## Text Colour Change Depending On Outcome Of Formula

Jul 6, 2009

i am looking for a formula, if i put it as plainly as i can then i hope someone can work it out for me!

if ad4 is greater or less than 30 then ad4 text is red, if ad4 is equal too 30 then text is green

## Formula To Change Cell Colour :: By Value Of Cell In Another Sheet

Sep 30, 2008

I need to set a cell colour by the value of a cell in another sheet so i can't use conditional format. Is there a formula that allows the user to set a cell style, colour, font etc.

## Formula To Change Cell Colour :: Due To Sum Increase Or Decrease

Sep 28, 2009

how to change the cell colour due to a sum increase or decrease? For example: if the amount is greater than 200, change cell colour to green. If under 200 change cell colour to yellow.

## Formula Change Cell Color Depending On Priority

Aug 29, 2012

My colleagues are working on multiple projects at once. The projects got different priority, so I'm looking for a formula that change the cell color if a person is working on it, depending on the project's priority.

For example if John is working on project: East(pri.1), South(pri.2) and West(pri.3). On East he got 5 remaining hours (cell E8). Then i would like that cell to turn red. For South green and West red.

## Copy Fill From Another Cell That Is Formatted To Change Depending On Its Formula

Dec 10, 2012

As seen from my attached file,

The colour of the percentage cell changes according to its percentage. I would like the S/N cells to have the same colour as the total percentage cells automatically. (Even when the percentage updates)

Secondly, for the cells under "Target", if the target dates are 1 day before today(the current date on a particular day) and the actual date is not filled, the cell fill will turn amber.

If today is on or after the target date and the actual date is not filled, the cell will turn red.

However, if the actual date is filled, the target date cell will be filled green, overwriting the above two condition.

FormattingHelpExample.xls‎

## Cell Colour Depending On Value Entered

Apr 19, 2007

I found the code below to do almost exactly what i want. However, i would like to know if it can be modified to only affect a specific cell range. In my case, the cell range is B9:AF37.

Option Compare Text 'A=a, B=b, ... Z=z
Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)

Dim Cell As Range
Dim Rng1 As Range

On Error Resume Next
Set Rng1 = ActiveSheet.Cells.SpecialCells(xlCellTypeFormulas, 1)
On Error Goto 0
If Rng1 Is Nothing Then
Set Rng1 = Range(Target.Address)
Else
Set Rng1 = Union(Range(Target.Address), Rng1)
End If
For Each Cell In Rng1

## Make Cell Open Different Files Depending On Its Fill Colour?

May 27, 2014

if I have one cell that ive enlarged to half the sheet.... and it is effected with rollover hyperlink so that when I hover over other cells. it turns different colours..

is it possible to make that cell open up different files using the double click event depending on the colour it currently is?

i.e. if its blue, open file1. if its yellow, open file 2 etc

## Change Colour Of Certain Cells When Condition Met

Jul 31, 2014

I am using the following code to amend the colour of a cell when a name is entered in ROW J however, i need it to colour the row from A to O on the line the name is entered on.

So for example Dave is in j2 (j1 is a header) the line from A2 to o2 goes green.

I have tried a few things with interesting results but not get desired result.

[Code] ......

## Conditional Format To The Colour Of A Particular Cell If The Condition Is Met?

Jun 13, 2007

is there any way to set the conditional format to the colour of a particular cell if the condition is met?

## VBA To Change Background Colour In Free Form Depending On Text In Cells?

Apr 3, 2014

I have a spreadsheet with several freeforms. I would like them to change backgroundcolour, if the content in a cell is equal to another cell.

Basically I would like my shape "Freeform1" to change backgroundcolour to RGB (0, 180, 0) if Sheet1.Range ("A1") = Sheet2.Range("D3").

If it's not the same content in both cells, I would like the freeform to remain unchanged, that's RGB (79, 129, 189).

This should happend automaticly, so I don't have to click the shape to make it happen.

## Skip Code Depending On Cell Condition

May 17, 2006

I m trying to bypass some code if a certain condtion is meet. If Cell A1 has a zero in it I want to skip the following code and continue one with the rest of the macro. This is the code I have.

j = 0
RowCount = Cells(Cells.Rows.Count, "a").End(xlUp).Row
cell_a = Range("A1").Value
If Not cell_a = 0 Then
Rows("1:" & cell_a * 2).Select
Selection.Insert Shift:=xlDown
Range("A1").Select
For i = 1 To cell_a * 2
Range("a" & i).Select
ActiveCell.Value = j
j = j + 0.5
Next i

I put the If Not/Then statement in there to try and figure out what do. But I don't know what to put after the THEN statement. Basically I want run the code after the THEN statement if there isn't a zero in cell A1 and skip the code if A1 contains a zero.

## Excel 2007 :: Get Cell To Refer To Date That It Contains And Change Cell Colour Based On That?

Dec 19, 2012

I work for a UK charity and have a list of funders in an Excel 2007 spreadsheet.

One of the columns refers to the date on which a new application for funding can be made to that particular funder.

In many cases new applications for funding can't be made for 1 or more years since the last application - sometimes as many as 5 years later. How to get a cell to refer to the date that it contains.

For example, say I have in cell A1 "The Acme Funding Organisation" and in cell B1 (i.e. the "Reapply when?" column) a date of 01/04/2013 (British date format, i.e. 1 April 2013) then what I want Excel to do is to look at the date in cell B1 and if that date has been reached to highlight the cell red. That way I'll know that the reapply date has been reached & that a new application can be made.

## Cell Color Fill Depending On Condition Of 2 Other Cells

Jun 23, 2009

Afternoon everyone i am having abit of trouble working on an excel 2007 spreadsheet. In cell I1 i have a tab called Color. i want the cells below I1 to be filled with one of 3 colors green, yellow, or red depending on whats in cell F "Status" (closed or open - in progress) and cell G ECD for estimated completion date.

Green - i need it to fill green if status is closed. Yellow - need it to fill yellow if ECD is any date greater than today and if status is open. Red - need it to fill red if ECD is todays date or older and status is open.

## Excel 2010 :: Change Colour Of Cell Based On Date In Other Cell?

Jan 10, 2013

I am trying to create a sheet in XL 2010.

In Column A each cell will contain a date (differnet from other cells in that column) when inspection was last done.

Column B is when the weekly inspection is due.
Column C is when bi-weekly inspection is due.
Column D is when monthly inspection is due.
Column E is when 6 monthly inspection is due.

I need a formula to change the colour of cells B, C, D & E when each inspection is due depending on the date entered in A

I am hoping its possible that the cell colour can stay for 2 days after the due date and then return back to blank after the second day.

For example if cell A1 has a date of January 1 2013 then on January 8 2013 cell B1 turns red then on January 10 2013 the cell returns back to normal.

A1
B1
C1
D1
E1

Inspection Date
Weeekly Due
Bi-WeeklyDue
Monthly Due
6 Monthly Due

January 1 2013
Change red Jan 8 & return blank Jan 10
Change red Jan 15 & return blank Jan 17
Change red Feb 1 & return blank Feb 3
Change red June 1 & return blank June 3

Ive also attached the worksheet

## Change Colour And Values Of Cell Based On The Value In Adjacent Cell?

Nov 10, 2012

I need to write a condition in such a way that cell IF A1= "DBR","BPR","SLR","SKR" then change cell B1 to SPECIFIC COLOUR Each condition different colour. A1 values ("DBR","BPR","SLR","SKR") is a list of selectable values. if the condition is falls then B1 should be normal (white color cell) with 0 in it.

## Cell Colour Change From Result In Adjacent Cell

Jun 1, 2006

I am trying to make the colour of cell change depending on the result in an adjacent cell and have found and adapted the following:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim icolor As Integer
If Not Intersect(Target, Range("x4:x202")) Is Nothing Then
Select Case Target
Case 11
icolor = 43
Case 21
icolor = 43
Case 31
icolor = 27
Case 41
icolor = 27................

## Attached Worksheet Automatically Shade Out All The Saturdays & Sundays In Any Given Month Everytime You Change The Month/Year Cell

Jul 19, 2006

Is there a way to make the attached worksheet automatically shade out all the Saturdays & Sundays in any given month everytime you change the Month/Year cell at the top of the worksheet, as example? I've tried using the weekday/Weekend formula, but can't quite get it right.

## Change Cell Colour When Select Cell

Oct 26, 2009

I have VBA code that changes the cell background colour in column A based on criteria in column B. What i want to do is select a cell in the same row in a range column O:AB and change the background colour to the same as column A. This action is for rows 4 to 41.

Basically i just want to click in a cell and for that cell's background colour to change and match the colour in column A.

## Change Row Colour When A Value Is Given In A Cell

Aug 7, 2006

I dont have that great knowledge in Excel but i wanted to try and run a
macro in an IF formula but realised that was not possible. I have now got a
formula that gives a value in a cell when i want the whole row to turn to
red, but im not sure how i can get a macro that will change the whole row to
red when that cell shows a value. Can anyone help on this matter?

## Change The Colour Of Cell

Nov 15, 2006

I am tyring to do conditional formatting whereby if anything is entered in a cell i want the colour to change to say yellow and if nothing is entered just to leave blank.

## Change A Colour Of A Cell

Nov 8, 2009

How can you change the colour of a cell (A1) using that number

eg

1=red2=orange3=white4=light blue5=Blue12345

OR

Make the cell with numbers above 0 go red and all cells with numbers below 0 go blue

## Row Change The Colour If A Particular Cell In That Row Contains One Particular Word

Feb 8, 2008

If A1 contains 'good' then row A = red

I need an entire row to change colour if a particular cell in that row contains one particular word.

## Cell Change Colour Due To What Input

Mar 31, 2013

I am making a little Formula 1 Grand Prix spreadsheet, and would like to know how do i enter a number into a cell and the cell changes colour.

[Code] .....

So if i type when of these in a cell i want to to change to the colour corresponding to the chart.

## Change Cell Colour On Doubleclick

Jul 17, 2009

I have the code below which fills a cell when doubleclicked. I would like to modify this to altenate between 3 different colours on each doubleclick.