Store formulas into names. The formula must start with an equals sign (=).
Sub addName() Names.add name:="ItemsInA", RefersTo:="=COUNTA($A:$A)" End Sub