Need some assistance please with the following line of code:
That line gives error 1004, Method 'Range' of object '_Worksheet' failed.
The formula is meant to count the 'X's in each column
I have chosen the 'Cells' route because the formula is to be written across the row, so the column has to be incremented.
I'm pretty sure I probably messed something up in the formula part with the quotations and the '&'s, but I just can't seem to figure it out using the 'Cells' way.
Any help is appreciated.
VBA Code:
WS.Range(Cells(LastRowOfNamesColumnC + BottomFormulasRowCounter, BottomFormulasColumnCounter)).Formula = "=CountIf(" & WS.Range(Cells(StartingRowOfNames, BottomFormulasColumnCounter) & ", " & Cells(LastRowOfNamesColumnC, BottomFormulasColumnCounter)) & ", ""*X*"")"
That line gives error 1004, Method 'Range' of object '_Worksheet' failed.
The formula is meant to count the 'X's in each column
I have chosen the 'Cells' route because the formula is to be written across the row, so the column has to be incremented.
I'm pretty sure I probably messed something up in the formula part with the quotations and the '&'s, but I just can't seem to figure it out using the 'Cells' way.
Any help is appreciated.