Ok I have the following code that works for the task I needed.
Sub colorcheck3()
Dim sOne As Worksheet
Dim sTwo As Worksheet
Set sOne = ThisWorkbook.Sheets("Sheet1") ' CHANGE ME
Set sTwo = ThisWorkbook.Sheets("Sheet2") ' CHANGE ME
Dim startRow1 As Integer
Dim endRow1 As Long
startRow1 = 1
endRow1 = sOne.Cells(Rows.Count, "C").End(xlUp).Row
Dim startRow2 As Integer
Dim endRow2 As Long
startRow2 = 12
endRow2 = sTwo.Cells(Rows.Count, "A").End(xlUp).Row
For x = startRow1 To endRow1
If sOne.Cells(x, 3).Interior.ColorIndex <> -4142 Then
For y = startRow2 To endRow2 Step 1
If sOne.Cells(x, 3).Value = sTwo.Cells(y, 1) Then
If sTwo.Cells(y, 9).Value <> "Yes" Then
If Format(sTwo.Cells(y, 6).Value, "m/d/yyyy") >= Format(Now(), "m/d/yyyy") Then
sTwo.Cells(y, 8) = ""
Else
If sTwo.Cells(y, 7).Value <> "Yes" Then
sTwo.Cells(y, 8) = "Yes"
End If
End If
End If
End If
Next y
End If
Next x
End Sub
The problem i'm running into is that in cell(y,6) I have the following formula that is pulling the date:
=IF(ISNUMBER(E14),WORKDAY(E14,2,$N$1:$P$2),"")
How can I change the code or add to it that will read the cell correctly because right now it isn't reading it as a date.
Bookmarks