Reputation: 301
I have below data (attached), which I have to add manually everyday.
Now, I am trying to automate it.
Please help me with these two codes.
Upvotes: 1
Views: 664
Reputation: 29421
Sub main()
With Range("A1").CurrentRegion
.Offset(, .Columns.Count).Resize(2, 1) = Application.Transpose(Array(Date, Application.WorksheetFunction.Subtotal(103, Worksheets("Stock").UsedRange.Columns(1).SpecialCells(XlCellType.xlCellTypeVisible))))
End With
End Sub
Upvotes: 1