hi
my code seems to work for day difference but month diff is broken
i need that if daydiff >3 but less than 1 month then daydiff else month diff
please help me
my code seems to work for day difference but month diff is broken
i need that if daydiff >3 but less than 1 month then daydiff else month diff
Rich (BB code):
'Intake Date
If IncludeAmendAppDate And AmendAppDate <> "" Then
MonthsPassed = DateDiff("m", CDate(AmendAppDate), Date)
DaysPassed = DateDiff("d", CDate(AmendAppDate), Date)
If DaysPassed >= 3 And DaysPassed <= 29 Then
.Range("A3:B3").Copy Destination:=.Range("A" & nr & ":B" & nr)
.Cells(nr, "A") = "Amendment App. Date was " & AmendAppDate & ", " & DaysPassed & " days have passed since signature was requested."
If MonthsPassed > 1 Then
.Cells(nr, "A") = "Amendment App. Date was " & AmendAppDate & ", " & MonthsPassed & " months have passed. Do you want to continue?"
.Range("A" & nr & ":B" & nr).Font.Color = 255
' ElseIf MonthsPassed >= 3 Then
' .Cells(nr, "A") = "Amendment App. Date was " & AmendAppDate & ", " & MonthsPassed & " months have passed. Do you want to continue?"
' .Range("A" & nr & ":B" & nr).Font.Color = 255
Else
.Cells(nr, "A") = "Amendment App. Date was " & AmendAppDate & ", " & MonthsPassed & " month has passed. Do you want to continue?"
End If
.Cells(nr, "B").ClearContents
.Range("A" & nr & ":B" & nr).Merge
.Range("A" & nr & ":B" & nr).Font.Size = 9
nr = nr + 1
End If
please help me