If the underlying scenario is true, then I want the value in column I to map over to column Q. I've been looking online, and at past dictionaries I've received help on, but I can't seem to figure out where I'm going wrong.
VBA Code:
Sub IQR_Calcs()
Application.DisplayAlerts = False
Application.ScreenUpdating = False
Dim m As Workbook
Dim mI As Worksheet, mM As Worksheet, mD As Worksheet, mO As Worksheet, mP As Worksheet, mV As Worksheet
Dim mILR As Long, mMLR As Long, mDLR As Long, mOLR As Long, mPLR As Long, mVLR As Long, i As Long
Dim Rng As Range
Dim Dic As Object
Set m = ThisWorkbook
Set mI = m.Sheets("CC_IQR")
Set mM = m.Sheets("CC_MC")
Set mD = m.Sheets("CC_MD")
Set mO = m.Sheets("ORC_PAR")
Set mP = m.Sheets("PRF")
Set mV = m.Sheets("Variables")
mILR = mI.Range("A" & Rows.Count).End(xlUp).Row
mMLR = mM.Range("A" & Rows.Count).End(xlUp).Row
mDLR = mD.Range("A" & Rows.Count).End(xlUp).Row
mOLR = mO.Range("A" & Rows.Count).End(xlUp).Row
mPLR = mP.Range("A" & Rows.Count).End(xlUp).Row
mVLR = mV.Range("A" & Rows.Count).End(xlUp).Row
'Identify the VTC start date.
Set Dic = CreateObject("Scripting.Dictionary")
For Each Rng In mI.Range("A2", mI.Range("A" & mI.Rows.Count).End(xlUp))
If Not Dic.exists(Rng.Value & Rng.Offset(0, 11)) Then
Dic.Add Rng.Value & Rng.Offset(0, 11), Nothing
End If
Next
For Each Rng In mD.Range("A2", mD.Range("A" & mD.Rows.Count).End(xlUp))
If Dic.exists(Rng.Value & Rng.Offset(0, 7)) Then
mD.Range("I" & Rng.Row).Copy
mI.Range("Q" & Rng.Row).PasteSpecial xlPasteValues
Else
If Not Dic.exists(Rng.Value & Rng.Offset(0, 11)) Then
mI.Range("Q" & Rng.Row) = "Review"
End If
End If
Next
Dic.RemoveAll
Application.ScreenUpdating = True
Application.DisplayAlerts = True
End Sub