Hi,
I need to convert the below excel function in to VBA
=SUMPRODUCT(Design!$B$19:$Y$19,'HB Data'!C3:Z3)
I have tried the below code but it shows 'Application-defined or Object-defined error'
LastCol = Cells(1502, Columns.Count).End(xlToLeft).Column
na = Split(Cells(1502, LastCol).Address, "$")(1) ''' o/p is 'Y"
LastCola = Cells(3, Columns.Count).End(xlToLeft).Column
nas = Split(Cells(j, LastCola).Address, "$")(1) ''' o/p is 'Z"
j=3
For i = 1 To Total_products
Cells(1, 1).Value = "=SUMPRODUCT(Design!B18 +" & i & ":" & na & "18 +" & i & ",'HB Data'!C3" & ":" & nas & j & ")"
Next i
Kindly help me to get out of this.
Thanks
Bookmarks