Sub MyFillBlanks()
Dim lr As Long
Dim r As Long
Dim s As Long
Dim oid As String
Application.ScreenUpdating = False
' Find last row in column C with data
lr = Cells(Rows.Count, "C").End(xlUp).Row
' Loop through all rows starting at row 2
For r = 2 To lr
' Check to see if column D is blank
If Cells(r, "D") = "" Then
' Get order id
oid = Cells(r, "C").Value
' Loop through all rows looking for matching Order ID
For s = 2 To lr
' See if matching order id with SKU
If (Cells(s, "C") = oid) And (Cells(s, "D") <> "") Then
' Populate missing SKU
Cells(r, "D").Value = Cells(s, "D").Value
Exit For
End If
Next s
End If
Next r
Application.ScreenUpdating = True
End Sub