Hello Raj,
First of all, you have to create a filter which will do that selection :
"Filtrer 2 d before 3 days after" :
Project / Filter for / More filters...
Finish ...Between... "Begining of periode"?;"End of periode"?
NB : I don't have the english version in front of me !
Then you write the VBA procedure which will activate this filter :
Sub Finish5days()
Dim RightNow As Date
Dim TwoDaysBefore As Date, ThreeDaysAfter As Date
RightNow = Date 'Read the date of the internal clock of your PC
TwoDaysBefore = RightNow - 2
ThreeDaysAfter = RightNow + 3
FilterApply Name:="Filtrer 2 d before 3 days after", value1:=TwoDaysBefore,
value2:=ThreeDaysAfter
End Sub
Gérard Ducouret
Raj said:
I want to write a macro which generates a excel sheet that shows a report
for tasks that should have finished yesterday, today and the tasks scheduled
to be complete in the next 3 days (basically a 5 day window report)