Hi there,
I need to be able to using a dynamically expanding range and am having some trouble with a formula using R1C1 notation with a COUNTIF statement.
Basically, I need to base my countif on the number of rows with content in column A.
You can see that in the code below that the range is now limited to 10,420 rows - that's what I'm trying to get around.
Thanks in advance - hope the question was clear enough!
I need to be able to using a dynamically expanding range and am having some trouble with a formula using R1C1 notation with a COUNTIF statement.
Basically, I need to base my countif on the number of rows with content in column A.
You can see that in the code below that the range is now limited to 10,420 rows - that's what I'm trying to get around.
Thanks in advance - hope the question was clear enough!
Code:
'My variable for the row count in column A.
Last_Row_ColA = Range("A" & Rows.Count).End(xlUp).Row
'Count the number of occurrences of the text string.
Range("J2").Select
ActiveCell.FormulaR1C1 = "=COUNTIF(RC[-2]:R[10420]C[-2],""*MSP*"")"