Why doesn’t it recognize the variable iUniqIdCells?
WORKS: Range(Cells(2, iCurntCol), Cells(iLastRow, iCurntCol)).Select
FAILS: Range("iUniqIdCells").Select
I want to count the entries in Range W2:W89 and put the total into W1
My ActiveCell.Formula doesn’t work
Sub CountEm()
‘Named Range "Concatenate" is Column V
‘Named Range "UniqIdCol" is Cell W1
iLastRow = Range("Concatenate").End(xlDown).Row
‘this is Row 89
iCurntCol = Range("UniqIdCol").Column
‘this is Column W
iUniqIdCells = Range(Cells(2, iCurntCol), Cells(iLastRow, iCurntCol))
‘this is W2:W89
Range("iUniqIdCol").Select
ActiveCell.Formula = "=COUNTA(iUniqIdCells)"
End Sub
Bookmarks