10-15-2023, 12:13 PM
(10-15-2023, 11:50 AM)bplus Wrote: Y'all did see the code that skipped the IF test altogether, just added in everything and then subtracted out the one thing not wanted. Time wise, BIG savings!
Code: (Select All)
nc = 0
FOR i = -1 TO 1
FOR j = -1 TO 1
nc = nc + Cells(x + j, y + i)
NEXT
NEXT
nc = nc - Cells(x, y)