Hello,
I would like to make my subtotal calculation depending on variable.
Right my formula is on the whole G Column:
Application.WorksheetFunction.Subtotal(9, Range("G:G"))
I add 2 variable (lmin and lmax) which will determine the first and last line to use
I tried this but doesn't work
Application.WorksheetFunction.Subtotal(9, Range(Cells(lmin, "G"), Cells(lmax, "G"))
Thanks in advance for helping
I would like to make my subtotal calculation depending on variable.
Right my formula is on the whole G Column:
Application.WorksheetFunction.Subtotal(9, Range("G:G"))
I add 2 variable (lmin and lmax) which will determine the first and last line to use
I tried this but doesn't work
Application.WorksheetFunction.Subtotal(9, Range(Cells(lmin, "G"), Cells(lmax, "G"))
Thanks in advance for helping