我在VBA中编写了以下代码,并且在条件中出现了类型不匹配错误;。SUMPRODUCT;。
For Day = 1 To DaysTill
For m = 0 To Rot
For n = 0 To StepsNumber
RArray((Day - 1) * (Rot + 1) + m, n) = Application.WorksheetFunction.SumProduct(--(Range("HT12:HT1048576") <= RotArray((Day - 1) * (Rot + 1) + m)), --(Range("HS12:HS1048576")) = Day, Range("HT12:HT1048576"), Range("HV12:HV1048576").Offset(, n)) * PriceStepArray(n)
Next n
Next m
Next Day
有谁知道如何解决这个问题?