I have some help on formula syntax for sumproduct
Below is my code:
Dim m As Integer
Dim k As Integer
Dim Rng1 As Range
Dim Rng2 As Range
Dim Rng3 As Range
Set Rng1 = Range(Cells(row + 1, 2), Cells(row + m, 2))
Set Rng2 = Range(Cells(row + 1, 5), Cells(row + m, 5))
Set Rng3 = Range(Cells(row + 1, 5), Cells(row + k, 5))
Range("F17").Select
ActiveCell.Formula = "=$B$17+SumProduct(Rng1.Address,Rng2.Address)"
'Rng1 = $B$18:$B$23
'Rng2 = $E$18:$E$23
I want to show the formula of SumProduct on Excel Cell"F17"
like this "$B$17+SumProduct($B$18:$B$23,$E$18:$E$23)" but the syntax in BLUE does not work
The range cannot be fixed in the syntax because they are flexible.
Is there any suggestions for the syntax inside SumProduct?
Thank you very much for your time
Below is my code:
Dim m As Integer
Dim k As Integer
Dim Rng1 As Range
Dim Rng2 As Range
Dim Rng3 As Range
Set Rng1 = Range(Cells(row + 1, 2), Cells(row + m, 2))
Set Rng2 = Range(Cells(row + 1, 5), Cells(row + m, 5))
Set Rng3 = Range(Cells(row + 1, 5), Cells(row + k, 5))
Range("F17").Select
ActiveCell.Formula = "=$B$17+SumProduct(Rng1.Address,Rng2.Address)"
'Rng1 = $B$18:$B$23
'Rng2 = $E$18:$E$23
I want to show the formula of SumProduct on Excel Cell"F17"
like this "$B$17+SumProduct($B$18:$B$23,$E$18:$E$23)" but the syntax in BLUE does not work
The range cannot be fixed in the syntax because they are flexible.
Is there any suggestions for the syntax inside SumProduct?
Thank you very much for your time