This formula works, but I’d like to change the R[1000] to R[iLastRow], but it doesn’t work.![]()
ActiveCell.FormulaR1C1 = _ "=(SUMPRODUCT(SUBTOTAL(3,OFFSET(RC[-7]:R[1000]C[-7],ROW(RC[-7]:R[1000]C[-7])-MIN(ROW(RC[-7]:R[1000]C[-7])),,1)),--(RC[-7]:R[1000]C[-7]>=0)))-1"
Is there a way to include my iLastRow variable into the formula?
I’m counting the visible lines in a filtered list because I only want to print the listing if there is actual data.
Bookmarks