I have a simple macro where I just need to count the number of rows on two sheets and list it on the Receipts tab.
I have the following code but I cannot seem to get it to work. Any help in identifying where I am going wrong will be appreciated.
Dim wk As Workbook
Dim ws As Worksheet
Dim Lrow As Long
Dim rng As Range
Dim i As Long
Set wk = ThisWorkbook
Set ws = wk.Worksheets("Receipts")
Lrow = .Range("A" & .Rows.Count).End(xlUp).Row
.Range("B2").Formula = "=CountA('0-29'!A2&Lrow)"
.Range("B3").Formula = "=CountA('30-60'!A2&Lrow)"