Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata
Public Sub WOQC_Get_Date()
 
DateHeader = FindHeaderCol("4:4", "Date")

Set rng = Application.ActiveSheet.Range(DateHeader & "1:" & DateHeader & Cells(Rows.Count, 1).End(xlUp).Offset(1).Row)

'LatestDate = Format(WorksheetFunction.Min(ActiveSheet.Range("F1:F22")), "dd/mm/yyyy")
OldestDate = Format(WorksheetFunction.Min(rng), "dd/mm/yyyy")
Debug.Print OldestDate
NewestDate = Format(WorksheetFunction.Max(rng), "dd/mm/yyyy")
Debug.Print NewestDate
End Sub

  • No labels