How do I use lastcol in my last line of code to count from B2 to lastcol2?
VBA Code:
Range("B1").Select
ActiveCell.FormulaR1C1 = "COUNT"
Range("B2").Select
Dim lastcol As Long
lastcol = Cells(ActiveCell.Row, Columns.Count).End(xlToLeft).Column
Cells(ActiveCell.Row, lastcol + 1).Select
ActiveCell.FormulaR1C1 = "=COUNT(B2:??2)"