I have the code below, which is almost an exact copy of code elsewhere in the same workbook; but for some reason, the formula isn't being entered into the workbook. I've stepped through the code, and every line works as expected, except for the formula entry. Thoughts?
Code:
Sub IDDupBKI()
Application.ScreenUpdating = False
Dim UV As Worksheet
Set UV = ThisWorkbook.Sheets("Unique_Volume")
If UV.FilterMode = True Then
UV.ShowAllData
Else
End If
'Sorts the Unique Volume sheet by Delete, Month, Queue
SortAsc UV, "Q1", "P1", "I1"
With UV
'On Error Resume Next
.UsedRange.AutoFilter Field:=9, Operator:=xlFilterValues, Criteria1:=Array("BKI Holds", "BKI Issues")
End With
'Sorts the visible cells by Loan, Bucket 1, Bucket 2, Date, Calculated Time
SortAsc UV, "A1", "B1", "C1", "D1", "G1"
UVLR = UV.Range("A" & Rows.Count).End(xlUp).Row
If UVLR > 1 Then
Range("Q2:Q" & UVLR).SpecialCells(xlCellTypeVisible).Value = "=IF(AND(RC[-8]=R[-1]C[-8],RC[-16]=R[-1]C[-16],RC[-15]=R[-1]C[-15],RC[-14]=R[-1]C[-14],RC[-13]=R[-1]C[-13],RC[-12]=R[-1]C[-12]),""Yes"",""No"")"
Else
End If
UV.Range("Q2:Q" & UVLR).Copy
UV.Range("Q2").PasteSpecial xlPasteValues
Application.CutCopyMode = False
UV.ShowAllData
Application.ScreenUpdating = True
End Sub