Do it in a single statement as lecxe shows but don't make it absolute
Worksheets("Target").Range("B2:B5").Formula = _ "=SUMPRODUCT((Data!$A2:$A" & DataLastRow & " =Target!A2)*Data!$B2:$B" & DataLastRow & ")"
Do it in a single statement as lecxe shows but don't make it absolute
Worksheets("Target").Range("B2:B5").Formula = _ "=SUMPRODUCT((Data!$A2:$A" & DataLastRow & " =Target!A2)*Data!$B2:$B" & DataLastRow & ")"
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber