I am very new to VBA and trying to automate one of my repetitive tasks. I have multiple sheets in a workbook and the range from L upto a dynamic number of columns ( I say dynamic number of columns because for some sheets I have 2 columns and for some I have 14 columns) I have various dates. I need to go to the last blank cell, give the column header as "max date" and find out the max date from the range of dates
I have tried this script myself but getting errors
Worksheets(1).Activate
Dim singlesheet As Worksheet
Application.ScreenUpdating = False
For Each singlesheet In Worksheets
singlesheet(Range("A1", Range("A1").End(xlDown))).Rows.Count
Range("A1").Select
ActiveCell.Offset(1, 0).Select
ActiveCell.Value = "Max date"
Next singlesheet
I get a Run time error 438
Object does not support this property or method
singlesheet(Range("A1", Range("A1").End(xlDown))).Rows.Count
? – Mikku