Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50085

Counta Ofset every 5 columns

$
0
0
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?

Code:

For K = 0 to 5
PTQueue = Application.WorksheetFunction.CountA(Range("A:A")).Offset(0, 5 * K)
MSgBox PTQueue
Next K


Viewing all articles
Browse latest Browse all 50085

Trending Articles