Could you please advise how to convert a formula to VBA code
=SUMPRODUCT(SUBTOTAL(3,OFFSET((AT2:AT644),ROW(AT2:AT644)-MIN(ROW(AT2:AT644)), ,1)) * (AT2:AT644="6"))
i do like this, but question how to use "offset" in current code?
Application.WorksheetFunction.SumProduct(Application.WorksheetFunction.Subtotal(3, Application.Range.Offset(("AT2:AT644"), Application.Rows("AT2:AT644") - Application.WorksheetFunction.Min(Application.Rows("AT2:AT644")), , 1)) * ("AT2:AT644" = "6"))
Thanks,
Regards,
Lure