I have a table that looks like this:
ER Visits
Control #
2055
2056
2057
2058
2059
and I want to count how many ER visits are in the table. The catch is that I have a lot of excel spreadsheets with more or less ER visits. I need a VBA code that can count them for me automatically when I open each spreadsheet, without me editing this code over and over again:
Sub ER()
Range("G6") = WorksheetFunction.counta(Range("A20:A24"))
End Sub
Thanks!
Bookmarks