Hi guys,
I have a file in which, based on two criteria (=unique IDs), I like to paste comments that come from anonther worksheet in my file. The piece of code below does the trick but i **** slow. How can I tweak this in order to make it quicker?
Hope you can help!
I have a file in which, based on two criteria (=unique IDs), I like to paste comments that come from anonther worksheet in my file. The piece of code below does the trick but i **** slow. How can I tweak this in order to make it quicker?
Hope you can help!
Code:
Sub Paste comments()
Application.screenUpdating = False
For Each Cell In Range(Cells(2, 2), Cells(2, 2).End(xlDown))
If Cell.Offset(0, 15) = 1 Then
Cell.Offset(0, 14).FormulaR1C1 = "=IFERROR(INDEX('Standaard Verklaringen'!R1C2:R250C4,SUMPRODUCT(Match(" & Cell & "&" & Cell.Offset(0, 5).Value & ",'Standaard Verklaringen'!R1C2:R250C2&'Standaard Verklaringen'!R1C3:R250C3,0)),3),"""")"
Cell.Offset(0, 14).Value = Cell.Offset(0, 14).Value
End If
Next Cell
Application.ScreenUpdating = True
End Sub