Conditional Formatting progress tracker.

james.benham

New Member
Joined
Jul 1, 2009
Messages
6
Hi
I have to produce an excel spreadsheet with conditional formatting:
The spreadsheet is a progress monitor on various stages of projects. Each project has a target completion date and three stages. Stage 1 is meant to be completed 30 days before the target completion, stage 2 is meant to be 20 days and stage 3 completed 10 days before completion.
In column a is a list of projects, columb H is their target completion dates, column M,Nand O have the dates when the 3 stages have been completed c=stage 1, d=stage 2 etc...
The dates are entered into the appropriate cells as and when the project reaches each stage. I want the cells to have the formats as follows:

In the below code Cell M14 is where the target time (30 days before completion) is stored.


"complete": grey
some other text: brown
Blank: White
Date more than two days earlier than target date for that particular stage: blue
date two days either side of target date: green
Date upto 10 days late: orange
Date between 10 and 20 days late: pink
Dater over 20 days: flashing red or pop up message each time somebody opens the spreadsheet (if this is possible. if not then just deep red)
Any help would be appreciated.



This is what I'm working on at the moment but a few things are not working. This is just for the M column

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim icolor As Integer
    If Not Intersect(Target, Range("M15:M34")) Is Nothing Then
 
        Select Case Target
            Case 0
                icolor = 2
            Case "complete"
                icolor = 15
            Case Is > (Range("I15").Value + Range("M14").Value + 20)
                icolor = 3
            Case Is > (Range("H15").Value + Range("M14").Value + 10)
                icolor = 38
            Case Is > (Range("H15").Value + Range("M14").Value + 5)
                icolor = 40
            Case Is > (Range("H15").Value + Range("M14").Value + 2), Is > (Range("H15").Value + Range("M14").Value - 2)
                icolor = 35
            Case Is > (Range("H15").Value + Range("M14").Value - 10)
                icolor = 34
            Case Else
                icolor = 53
 
        End Select
 
        Target.Interior.ColorIndex = icolor
    End If
 
End Sub
So i think Ive got some of the basics, I can't get it to detect if a cell has text in it I was going to leave it to Cse Else, but I think excel considers text as fulfilling the 3rd case as the cell turns red if I enter "fshfjkg" for example.

Also, I am comparing each cell to H15 rather than their own H row cell.

Thanks Again,

James
 
Last edited:

Forum statistics

Threads
1,081,840
Messages
5,361,618
Members
400,642
Latest member
tekster23

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top