So I have this code but I am wanting it to look in the Transaction Type Column and if the cell says Addition I need it to look at the WarrantyEnd Column and if the cell is Blank I need it to make a note in the Analyst Notes Column and say "Review - Missing Warranty - Addition" I follow most of the code but the .SpecialCells part so I assume I need to have something in my code to searh for a blank cell in WarrantyEnd column...
VBA Code:
Sub MissingCoverage()
'Looks for Missing Coverage in Coverage Column'
Dim CCol As Range
Dim SMNCol As Range
Set CCol = Range("1:1").Find("Coverage", , , xlWhole, , , False, , False)
If CCol Is Nothing Then
MsgBox "Coverage Column Not Found"
Exit Sub
End If
Set SMNCol = Range("1:1").Find("Site Manager Notes", , , xlWhole, , , False, , False)
If SMNCol Is Nothing Then
MsgBox "Site Manager Notes Column Not Found"
Exit Sub
End If
With CCol.EntireColumn
.Replace "Missing Coverage", "=true", xlWhole, , False, , False, False
On Error Resume Next
.SpecialCells(xlFormulas, xlLogical).Offset(, SMNCol.Column - .Column).Value = "Review - Missing Coverage"
On Error GoTo 0
.Replace "=true", "Missing Coverage", xlWhole, , False, , False, False
End With
End Sub
VBA Code:
Sub MissingCoverage()
'Looks for Missing Coverage in Coverage Column'
Dim CCol As Range
Dim SMNCol As Range
Set CCol = Range("1:1").Find("Coverage", , , xlWhole, , , False, , False)
If CCol Is Nothing Then
MsgBox "Coverage Column Not Found"
Exit Sub
End If
Set SMNCol = Range("1:1").Find("Site Manager Notes", , , xlWhole, , , False, , False)
If SMNCol Is Nothing Then
MsgBox "Site Manager Notes Column Not Found"
Exit Sub
End If
With CCol.EntireColumn
.Replace "Missing Coverage", "=true", xlWhole, , False, , False, False
On Error Resume Next
.SpecialCells(xlFormulas, xlLogical).Offset(, SMNCol.Column - .Column).Value = "Review - Missing Coverage"
On Error GoTo 0
.Replace "=true", "Missing Coverage", xlWhole, , False, , False, False
End With
End Sub