Sub FiltraDATAEmissioneFattura()
Dim uRiga As Long, i As Long
Dim mesei, giornoi, annoi, mesef, giornof, annof
Dim Giorno As Integer, Mese As Integer
Dim DataI, DataF, DataA
Cells.Rows.Hidden = False
uRiga = Range("E" & Rows.Count).End(xlUp).Row
giornoi = InputBox("Inserisci GIORNO iniziale")
If giornoi = "" Then Exit Sub
mesei = InputBox("Inserisci MESE iniziale")
If mesei = "" Then Exit Sub
annoi = InputBox("Inserisci ANNO iniziale")
If mesei = "" Then Exit Sub
giornof = InputBox("Inserisci GIORNO finale")
If giornof = "" Then Exit Sub
mesef = InputBox("Inserisci MESE finale")
If mesef = "" Then Exit Sub
annof = InputBox("Inserire ANNO finale")
If annof = "" Then Exit Sub
DataI = CDate(giornoi & "/" & mesei & "/" & annoi)
DataF = CDate(giornof & "/" & mesef & "/" & annof)
For i = 2 To uRiga
DataA = CDate(Range("E" & i).Value)
'Giorno = Day(CDate(Range("E" & i).Value))
'Mese = Month(CDate(Range("E" & i).Value))
'Anno = Year(CDate(Range("E" & i).Value))
If DataA >= DataI And DataA <= DataF Then
Rows(i).Hidden = False
Else
Rows(i).Hidden = True
End If
Next i
End Sub
|