
Function estramin(mese, anno)
LR = Cells(Rows.Count, "A").End(xlUp).Row
For r = 4 To LR
If Month(Cells(r, 1)) = mese And Year(Cells(r, 1)) = anno Then
estramin = Cells(r, 1)
Exit For
End If
Next
End Function
Function estramax(mese, anno)
LR = Cells(Rows.Count, "A").End(xlUp).Row
For r = LR To 4 Step -1
If Month(Cells(r, 1)) = mese And Year(Cells(r, 1)) = anno Then
estramax = Cells(r, 1)
Exit For
End If
Next
End Function
|
