Hi All,
In column K, I am calculating a Sumproduct based on the criteria in columns C, D, & G. The data in all three should match. Column I has the numeric data. If column C, D, & G match and the cumulative value in Column I is greater than $1000 or less than $-1000 then I would like to return "Out of Tolerance", otherwise, "" (leave cell blank).
The code below works but takes an extraordinary amount of time to run because of the massive amounts of data I need. Can you help? Thanks for your time![]()
Dim myLastRowA As Long
myLastRowA = Range("A65536").End(xlUp).Row
Range("k2").Select
ActiveCell.FormulaR1C1 = "=IF(SUMPRODUCT(--(R1C3:R65000C3=RC[-8]),--(R1C4:R65000C4=RC[-7]),--(R1C7:R65000C7=RC[-4]),R1C9:R65000C9)>=1000,""Out of Tolerance"",IF(SUMPRODUCT(--(R1C3:R65000C3=RC[-8]),--(R1C4:R65000C4=RC[-7]),--(R1C7:R65000C7=RC[-4]),R1C9:R65000C9)<=-1000,""Top"",""""))"
Range("k2").AutoFill Destination:=Range("k2:k" & myLastRowA)
Range("k2:k" & myLastRowA).Select
Bookmarks