In VBA, is possible to count non-empty cells in a column given column index?
Something like this but using 6 as input instead of F
What I can think of is to make very long array of possible alphabets, but it doesn't look good.
And using R1C1 style in spreadsheet is also not preferable for me. Its okay if only in VBA, but not if changing display in excel into R1C1 style.
TIA
Something like this but using 6 as input instead of F
VBA Code:
n = WorksheetFunction.CountA(Range("F:F"))
What I can think of is to make very long array of possible alphabets, but it doesn't look good.
VBA Code:
ColNames = Array(A,B,C,D,E,F,G,H,I,J) 'and so on until ZZ
Col_ID = 6 'this is the input
col = ColNames(Col_ID - 1)
n = WorksheetFunction.CountA(Range(col & ":" & col))
And using R1C1 style in spreadsheet is also not preferable for me. Its okay if only in VBA, but not if changing display in excel into R1C1 style.
TIA