I am getting a Compile error: Sub or Function not defined using the following code:
Sub Macro1() Dim lastrow As Long With ActiveSheet lastrow = .Cells(.Rows.Count, "E").End(xlUp).Row Range("E1").Select ActiveCell.FormulaR1C1 = CountA("E3" & lastrow) End Sub
Im assuming this has something to do with Lastrow code but I am not sure.
I am trying to count all the cells with data in column E starting with cell E3 and using lastrow to find the last row.
Data gets entered into E1.
Bookmarks