I currently have these functions:
Code:
Function MonthStart()
MonthStart = DateValue(Month(Date) & "/1/" & Year(Date))
Select Case Weekday(MonthStart)
Case 1
MonthStart = MonthStart + 1
Case 7
MonthStart = MonthStart + 2
End Select
End Function
Function MonthEnd()
MonthEnd = DateAdd("m", 1, (Month(Date) & "/1/" & Year(Date))) - 1
End Function
Function PrevMonthStart()
PrevMonthStart = DateSerial(Year(Date), Month(Date) - 1, 1)
End Function
Function WeekStart()
WeekStart = Date - (Weekday(Date) - 2)
If Date - (Weekday(Date) - 2) = 0 Then WeekStart = WeekStart - 7
End Function
Function Yesterday()
Yesterday = Date - 1
Select Case Weekday(Yesterday)
Case 1
Yesterday = Yesterday - 2
End Select
End Function
Function WorkDay(tmpDate As Date) As Boolean
If Weekday(tmpDate) = 1 Or Weekday(tmpDate) = 7 Then WorkDay = False Else WorkDay = True
End Function
I was thinking something like
Code:
=Iif(Date() >= MonthStart(), >=Date()+1, if(it's the start of the 3rd week of the month, then >=MonthEnd()+1)
So something for identifying if today is the start of the 3rd week of the month and incorporating correctly in the if statement?