I have the following code, I am trying to use the SUMPRODUCT function, I want to loop through all the concatenated values in A and B and then use that info in the SUMPRODUCT. But my code isn't doing anything or throwing up any errors. I don't see why it doesn't work?
VBA Code:
Sub SumData()
Dim val As Long
Dim Concat(2 To 250) As Variant
For val = 2 To 250
Concat(val) = Cells(val, 1) & " " & Cells(val, 2)
Evaluate ("=SUMPRODUCT(--(Concat(Val)=Cell(Val,9)),Cell(Val,4),Cell(Val,6))")
With ThisWorkbook.Worksheets("Sheet1").Range("K2:K250")
End With
Next val
End Sub