Good Afternoon,
How do I tweak this line of code, to count the number of non-blanks in a column, with an unknown number of rows in a range?
ActiveCell.FormulaR1C1 = "=COUNTA(R[-3]C:R[-1]C)"
I tried to record the macro and used the Relative References, however it did not work.
The amount of rows with items varies.
Here is an example of a result with "3" in Cell B4 and "4" in Cell B9.
Thank you
How do I tweak this line of code, to count the number of non-blanks in a column, with an unknown number of rows in a range?
ActiveCell.FormulaR1C1 = "=COUNTA(R[-3]C:R[-1]C)"
I tried to record the macro and used the Relative References, however it did not work.
The amount of rows with items varies.
Here is an example of a result with "3" in Cell B4 and "4" in Cell B9.
Thank you
A | B | |
---|---|---|
1 | Apple | 4 |
2 | Banana | 15 |
3 | Orange | 5 |
4 | 3 | |
5 | Johnny | 10 |
6 | Mike | 25 |
7 | Melanie | 3 |
8 | Philip | 2 |
9 | 4 |