Good day,
I am trying to make a count for every 5 columns in a for loop,
I can do it normal on a cell with the following,
=COUNTA(OFFSET(A:A,0,5))
How can I implement this in VBA?
I am trying to make a count for every 5 columns in a for loop,
I can do it normal on a cell with the following,
=COUNTA(OFFSET(A:A,0,5))
How can I implement this in VBA?
Code:
For K = 0 to 5
PTQueue = Application.WorksheetFunction.CountA(Range("A:A")).Offset(0, 5 * K)
MSgBox PTQueue
Next K