Advertisement
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: |
Public Sub TimelineGraph()
Dim InnvationCell, StrategicCell, DevelopmentCell, RefCell, RefSACell, SATargetCell As Range
Dim Cell As Range
Dim Count As Integer
Do
For Each Cell In Intersect(Sheets("C").UsedRange, Sheets("CXD Program Status").[B6:B65536])
If Len(Cell) > 0 Then
If IsEmpty(Cell) <> True Then
'set the dates in the cells
Set InnvationCell = Cell.Offset(0, 6)
Set StrategicCell = Cell.Offset(0, 7)
Set DevelopmentCell = Cell.Offset(0, 8)
Set RefCell = Cell.Offset(0, 9)
Set RefSACell = Cell.Offset(0, 10)
Set SATargetCell = Cell.Offset(0, 11)
'Dim row As Long
If InnvationCell.Text <> "" & StrategicCell.Text <> "" Then
'row = FindName(Cell.Value)
Call CreateBar(Cell.Value, CDate(InnvationCell.Value), CDate(StrategicCell.Value), 45)
End If
If IsEmpty(DevelopmentCell) <> True & IsEmpty(StrategicCell) <> True Then
Call CreateBar(Cell.Value, CDate(StrategicCell.Value), CDate(DevelopmentCell.Value), 6)
End If
If IsEmpty(DevelopmentCell) <> True & IsEmpty(RefCell) <> True Then
Call CreateBar(Cell.Value, CDate(DevelopmentCell.Value), CDate(RefCell.Value), 5)
End If
If IsEmpty(RefSACell) <> True & IsEmpty(RefCell) <> True Then
Call CreateBar(Cell.Value, CDate(RefCell.Value), CDate(RefSACell.Value), 4)
End If
If IsEmpty(RefSACell) <> True & IsEmpty(SATargetCell) <> True Then
Call CreateBar(Cell.Value, CDate(RefSACell.Value), CDate(SATargetCell.Value), 39)
End If
If IsEmpty(SATargetCell) <> True Then
End If
End If
'Cell.Offset(0, 3) = Cell
Count = 0
Else
Count = Count + 1
If Count >= 3 Then Exit Do
End If
Next Cell
Exit Do
Loop
End Sub
Public Sub CreateBar(ByVal sName As String, ByVal startDate As Date, ByVal endDate As Date, ByVal iColor As Integer)
Dim lRow As Long
startDate = startDate - (Weekday(startDate, vbMonday) - 1)
endDate = endDate + (7 - Weekday(endDate, vbMonday))
With Application.WorksheetFunction
lRow = .Match(sName, Columns(1), 0)
End With
With Sheets("CX").Range("D" & lRow & ":EY" & lRow)
.FormatConditions.Delete
.FormatConditions.Add xlExpression, , _
"=AND(R[" & -lRow + 2 & "]C>=DATEVALUE(""" & startDate & """),R[" & -lRow + 2 & "]C<=DATEVALUE(""" & endDate & """))"
.FormatConditions(1).Interior.ColorIndex = iColor 'green
End With
End Sub
|
|
[x]
The Solution Rating System
|
||
|
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
|
Loading Advertisement... |