VBA To Colour Cell On Each Line Based On Date Match
Nov 25, 2013
I have a row which contains a date header.
Under this there are multiple lines of activities each with a different end date and empty cells under the calendar headers so that people can enter how long they have worked against that project.
What I want to do is to compile a VBA coded which will cycle each line and at the intersection of where the end date and header match to colour that cell in a defined colour.
An example below:
Date
Colour
01 Jan
02 Jan
--->
[Code]......
View 8 Replies
ADVERTISEMENT
Feb 11, 2009
It's quite funny that i'm asking this cause I answered a similar quesstion earlier. But I can't seem to get my head around the thinking of this one.
I am trying to create a formatting so that if todays date is greater than the date in the cell the cell is coloured red. And if todays date is > today()-14 <today() the cell is coloured yellow.
I don't think it is as simple as using conditionaly formatting, it may well be but like I said I can't quite get my head around what I need to do.
View 8 Replies
View Related
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.
View 2 Replies
View Related
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
View 1 Replies
View Related
Jan 17, 2014
creating a cell to show: no colour unless
date minus 90 days as amber
date minus 45 days as red
View 6 Replies
View Related
Apr 17, 2014
I have a lookup that gives and RGB colour code in Cell A1; for example 186, 206, 140.
I'd then like Cells R10:V15 to fill with the RGB colour based on the result in A1.
View 2 Replies
View Related
Feb 22, 2007
i am trying to do is match 2 columns data based on a condition ie i have data in column "b" of sheet called "balance" data is variable this column has unique indentifiers i want to look at another column and match the uniques identifiers in another sheet if the cell value in column "D" = "please investigate" otherwise do nothing, the (column f) it will be looking up too is in sheet called "hi- port" so if cell value in column "d" of sheet"balace"= "please investigate" match values that are same from colum "b" of sheet "balance" to that of column (f) sheet called "hi-port"
i would like to colour only entire row of sheet called "hi-port" when the data matches to other sheet ie from columns "f " too " b". colour can be any colour
igonre my ranges they are wrong just used as example
Sub start()
Dim oWs As Worksheet
Dim oRngCheck As Range
Dim oCl As Range
Dim cCola As Range
Dim cColb As Range
Dim rngIRd As Range
Dim rngACs As Range
Dim Match As Boolean
Set rngIRd = Range("a1", Range("a65536").End(xlUp)) 'define the rang
Set rngACs = Range("b1", Range("a65536").End(xlUp)) 'define the rang
Set oWs = Worksheets("balance") 'change to suit
'starts at b2 to llow for header row.......................
View 4 Replies
View Related
Oct 26, 2012
I have a question about creating a line graph, here's the scenario:
Once per week I update our inventory quantity in cells B1, B2, B3. I'd like to show these quantities on a graph which compares the quantity with the date. When the quantity gets updated it would automatically add week 2, when the quantity gets updated again it would again expand the graph and add week 3. Is this even possible?
Week 1
A B
Widget 2
Hammer 1
Saw 6
Week 2
A B
Widget 4
Hammer 1
Saw 6
View 2 Replies
View Related
May 21, 2009
I have this code but is not working, i need to make an ajustment to this as well as at present it will only change colour to 1 cell but i need it to format the whole line, this is what i have so far
View 5 Replies
View Related
Jul 20, 2006
i found the appropriate chart example in the chart section which was meant to show how to incorporate a feature which allows a line graphs line to change colour every time it hits a minimum/maxm value-however the example does not exist? re:conditional line
View 4 Replies
View Related
Jan 11, 2012
I need to get a range of cells to flash when they get close to todays date, I have tried but can't do it, not very good at conditional format or vba, easy step by step if poss, i have sheet if required,
todays date = 11/01/12 (in cell O1 as autodate)
title in cell K7 is date on site
in Cell K8 = 13/01/12
in Cell K9 = 19/02/12 etc....
I would like this cells background to flash if its 2 days from the onsite date
View 7 Replies
View Related
Feb 5, 2008
I m a newbie at Excel but i have a little work project on my hands which i would like to have an excel document have cells change colour to the date
eg:
Today is 05/02/08 cells with the attached date of this should be orange
Above this date should be green (e.g 10/02/08)
and below this date should be red (e.g 01/01/07)
Also after this problem is solved, the dates that turn orange is it possible to automatically have some sort of message come up saying that "Such as such is expiring" or for the red "Such and such is expired" and would the program/document need to be open for the messages to occur?
View 9 Replies
View Related
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
View 3 Replies
View Related
Sep 24, 2009
I have a userform that outputs data to a worksheet. One of the textboxes contains either one of 3 values, either: N/A, Debit, or Credit. This textbox is called "tbDebitOrCredit".
What I need is, when the the user clicks the "Submit" button and the data is output to the worksheet, the cell that recevies it output from "tbDebitOrCredit" turns a specific colour based on the value.
For example:
N/A = White
Debit = Red
Credit = Green
View 2 Replies
View Related
Jul 1, 2014
So I have a date in cell A1 for example.
Now if cell B1 is either blank, or more than 6 days from the date in cell A1 I want it to turn red.
View 3 Replies
View Related
Jun 18, 2008
Can you sum cells based on colour, and if so, how do you determine what code/number your colour is to input into the programming?
View 13 Replies
View Related
Sep 21, 2012
I'm trying to change the colour of a row based on the value in a cell (in a column) and am wondering how I can do that. Conditional formatting doesn't allow enough colours unfortunatly. Ive googled it and can only get a cell colour to change not a row colour.
To give an explanation:
Sheet 1: Rows 5 - 100 colour to change based on Sheet 2 Column K5-100.
Column K5-K100 will have values between 0 and 10.
View 4 Replies
View Related
Mar 20, 2013
I am trying to establish whether there is a excel formula which will allows you to just to count the cell with the same cell colour. I have made the below listed example to illustrate what I am trying to achieve:
A B C D E11/03
12/03
13/03
14/03
15/03
Total
[Code].....
In the there are total of two green colours, and one red colour to be counted.
View 3 Replies
View Related
Mar 21, 2013
I have a auto generated report that colours a certain column, that shows all the items that are in receiving error. I want to pivot the data and show the break down on the colours used; Green = newly added, Amber = escalated, Red = urgent
at the moment I'm adding a column next to it and filling it in myself. is there away to automate this? either via a custom forumla or marco
View 1 Replies
View Related
Aug 5, 2013
I have a table which says that this is the amount of coloured cells we have in another sheet.
For e.g.
Field Name Code A
Item Description 5
Now, the item description column has 5 cells in another sheet which are filled in with "Yellow" Colour. So what i want to do is to click on this 5 in sheet 2 in this case as per the attached sample which takes me to the filtered result on sheet1 of 5 yellow coloured cells under the column of Item description including an additional filter of Code "A"
View 1 Replies
View Related
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.
View 1 Replies
View Related
Jun 28, 2014
In the xls for each step I have 2 raws-planned and actual. Step planned duration is populated manually over the weeks.Before that row we have another reflecting the actual step status per week
I would like to find a way how cell reflecting the actual status of a step can be automatically populated (coulored) based on the colour/value of activities that are planned for that week and for that step.Activities are listed below the step and again have planned and actual row.
The rule should be : if for a week we have several activities all of them should be finished in order to have step stataus auto populated as green. If a single activity planned for that week is not done-then weekly step status should be red.
The activities for each step are grouped below the step. It seems that one of the difficult part in that request would be how formula will understand where starts and finishes the activities that belong to one step. To get that happen I placed a column showing step and another column where we activity.
View 9 Replies
View Related
Jun 30, 2009
Using 2007, I need to conditionally format a cell colour based on 5 other cell colours that have been conditionally formatted. The 5 other cells will be coloured either red or greem. What I want to do is have an overall status cell that would be show green if all of the other 5 cells were green, amber if 4 of the other cells were green and one was red and red if 3 or more cells are red.
View 4 Replies
View Related
Feb 1, 2013
I am trying to make a cell change colour based on the partial content of another cell.
For example, cell A4 has a alpha-numeric sequence in it and I want cell B4 to turn blue if part of the sequence is ABD or F&C.
View 1 Replies
View Related
Jun 18, 2014
I am trying to create a Macro/VB code that will build 4 lists based on a list (see attached example).
I have a list of applications and the numbers of users having them installed on their computers, these applications are marked using a RAG status (Red, Amber, Green & NBR No Business Requirement) on a seperate work sheet i want to split them by these RAG statuses, the status of applications changes as they are packaged for SCCM, so the RAG status will be changed, so i want the code to be able to rebuild the lists at any time to obtain an accurate view of the numbers at each status.
View 6 Replies
View Related
Mar 22, 2011
I have a circle object on an Excel spreadsheet(I used "Insert", "Shapes" to put it there).
I would like to change the colour of the circle object based on the contents of cell A1.
Cell A1 will be "Red", "Yellow" or "Green".
If I type "Green" into cell A1, then I would like the circle object to change to green.
If I type "Yellow" into cell A1, then I would like the circle object to change to yellow....
View 9 Replies
View Related
Mar 21, 2012
I've seen examples of VBA that will colour autoshapes based on cell values. I have a map of the UK made up of autoshapes that have been edited to create a shape of each postcode area such as EX, GL, NR etc. Also I have a list of all these postcode areas and I have given them a zone number (1-7) depending where in the UK they are.
PcodeZoneDH3DL3DN2DT1DY2E4EC4EH5
At the moment I have set the colours using the fill option so anything that is a particular zone is a certain colour (i.e. zone 2 is green).
What I would like to do is to set a zone to a colour, so the map will update all the zones with the right colours.
I need to be able to read the zone number that is assigned to a postcode area and change the relevant autoshape to the correct colour so that any postcode area can be one of 7 colours.
I can't attach a spreadsheet with my map and postcodes otherwise I would have.
Is there an easy way i can read the zone number of each postcode area in the list and update that autoshapes colour? Would the autshape need to have a name so it know which one to update or is this not possible?
View 9 Replies
View Related
Oct 22, 2012
I have found this code that, with changes, I can make work with the cells and columns I am using. What I cannot see is how to make more than one cell change colour rather than just the cell in column J.
How can I change the code below to change several cells in the row? I will be using cells in columns A:F.
Data will be entered into the rows from A2 to E2, in F2 a vlookup will enter one of the values, "High", "Medium" etc.
Each of these values has a colour assigned. The code below, with alterations, will be able to colour the cell in F2 depending on which value is entered. I need the whole row from A2 to F2 to be coloured.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim ChangedRange As Range
Dim r As Long, iCol As Long
Set ChangedRange = Intersect(Target, Columns("F:H"))
[Code] ......
View 5 Replies
View Related
May 3, 2007
I have inherited a spreadsheet from someone else that rather cleverly (in my humble opinion) sets the colour dependant on the contents. ie negative value is red, zero is amber and positive is green.
i like the idea and would like to use it on a spreadsheet of my own, but have tried to find out how it is done and can't!
View 9 Replies
View Related
Mar 21, 2008
I would like to change cells A2 to G2 to a different colour based on the value of G2
(0 to 48) Dark Green
(-2) Light Green
(-4) Yellow
(-6 to -48) Red
The range of the sheet would be A2 - G130. Each Row would change on value of cells in Column G.
View 9 Replies
View Related