Function expiryIssue(rng As Range) As String Application.Volatile Dim dte1 As Range Dim dte2 As Range Dim status As String Set dte1 = rng.Cells(1, 1) Set dte2 = rng.Cells(1, 2) status = rng.Cells(1, 3) If status <> "Expired" And status <> "Cancelled" And status <> "Replaced" Then ' If there is no Proposed or Approved expiry date If dte2 = "" And dte1 = "" Then expiryIssue = "Missing expiry dates" Else 'If there is no Approved Expiry date and the Proposed Expiry date is within 60 days of todays date If dte2 = "" Then If dte1 < Date + 60 Then expiryIssue = "Review proposed expiry date" Else 'If the Approved Expiry date is older than today's date If dte1 = "" Then If dte2 < Date Then expiryIssue = "Issue" Else If dte2 < Date Then expiryIssue = "Issue" End If End If End If End If End Function
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE