Forum Discussion
hrh_dash
Sep 14, 2022Iron Contributor
vba countif formula
How do i correct the countif formula for using the FormulaR1C1 method?
Excel formula is as follows:
B2 to the last row = Countif(A:A,A1) and this be drag down to the last row with value
Macro as follows:
lastRow = Destws.Cells(Destws.Rows.Count, "A").End(xlUp).Row
Destws.Range("B2:B" & lastRow).FormulaR1C1 = "=countif(RC[-1]:lastRow, RC[-1})"
Appreciate the help in advance!
2 Replies
Sort By
- hrh_dashIron Contributorthanks for the assist!