This is what I have so far:
CODE
Sub CountA()
Dim r As Long, c As Integer
Dim maxR As Long, maxC As Integer
maxR = .Rows.Count
maxC = .Columns.Count
For c = 1 To maxC
Cells(c).Formula = "=counta(" & columnref & "2:" & columnref & maxR & ")-1"
Next c
End Sub
Dim r As Long, c As Integer
Dim maxR As Long, maxC As Integer
maxR = .Rows.Count
maxC = .Columns.Count
For c = 1 To maxC
Cells(c).Formula = "=counta(" & columnref & "2:" & columnref & maxR & ")-1"
Next c
End Sub
I need to enter this formula in row 1 for every populated column. When I run this "as is" I get an error that reads: "Invalid or unqualifed reference." The .Rows is hightlighted in the VBE.
Ideas? Suggestions? Help?