Hi everyone,
I am new to Excel programming and I have a question regarding finding the oldest 2 dates in a specific cell.
I am trying to build an application that automatically sends an email but can't seem to filter the 2 oldest dates which is why when I click on send, all the records are sent.
Please look at the my code and tell me what the problem is. Thanks
I am new to Excel programming and I have a question regarding finding the oldest 2 dates in a specific cell.
I am trying to build an application that automatically sends an email but can't seem to filter the 2 oldest dates which is why when I click on send, all the records are sent.
Please look at the my code and tell me what the problem is. Thanks
For i = 2 To Sheets("sheet1").Range("f65536").End(xlUp).Row
If Cells(i, 4).Value <= Date + 5 Then
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)