Hi,
I posted yesterday having a problem with several ifs in a sub that are not all executing. per a suggestion I went ahead and changed the locations of my end ifs. Now the only one that is executing is the first one in the sub.
here it is:
Any help is appreciated
Thanks,
Ritz
Sub dashboardupdate()
For Each cell In Range("dashboard")
'Makes the completed cells green if they were on time
If cell.Offset(0, 16) > cell.Offset(0, 15) Then
cell.Offset(0, 15).Interior.ColorIndex = 4
End If
'This will make all past due cells red
If cell.Offset(0, 16) < cell.Offset(0, 15) Then
If IsDate(cell.Offset(0, 15)) Then
cell.Offset(0, 15).Interior.ColorIndex = 3
End If
'Makes the completed cells green if they are equal and they are date values
If cell.Offset(0, 16) = cell.Offset(0, 16) Then
If IsDate(cell.Offset(0, 15)) Then
cell.Offset(0, 15).Interior.ColorIndex = 4
End If
'This will color due date of today in R with a turqoise color
If cell.Offset(0, 16) = Range("today") Then
cell.Offset(0, 16).Interior.ColorIndex = 8
End If
'This will make all of the empty cells pink if both Q and R are empty
If cell.Offset(0, 15) = cell.Offset(0, 16) Then
If cell.Offset(0, 16) = "" Then
cell.Offset(0, 15).Interior.ColorIndex = 38
End If
'This will make all cells containing a date in R and blank in corresponding Q dark blue
If IsDate(cell.Offset(0, 16)) And cell.Offset(0, 15) = "" Then
cell.Offset(0, 15).Interior.ColorIndex = 32
End If
'This will make all cells with NAB equal to issue manager with a QA date Complete
If cell.Offset(0, 5) = cell.Offset(0, 7) Then
If IsDate(cell.Offset(0, 19)) Then _
cell.Offset(0, 32) = "Complete"
End If
End If
End If
End If
Next
End Sub
Bookmarks