Hey
i have a ? aboud a macro wher i print out a list from sheet "bogføring" but it print all out
i want it to only print out the select year i sheet "T" C2 if i change year in C2 the print out will change
and the year start in sheet "T" C4 and end in sheet "T" C5
the year can also start 1-11-21 and end 30-10-22
in sheet "bogføring" i only have 2 year now but more will com
sorry my english
Hi,
Try this code for filtering:
Dim StartDate As Date, EndDate As Date
StartDate = ThisWorkbook.Worksheets("T").Cells(4, "C").Value2
EndDate = ThisWorkbook.Worksheets("T").Cells(5, "C").Value2
ActiveSheet.Range("$A$5:$J$2392").AutoFilter Field:=1, Criteria1:= _
">=" & CDbl(StartDate), Operator:=xlAnd, Criteria2:="<=" & CDbl(EndDate)
Hey
thanks, it works i think after a short test
but have can i get the hole list back after print, ther is only that i have printet