Rahul Malhotra
New member
- Joined
- Apr 18, 2018
- Messages
- 43
- Reaction score
- 0
- Points
- 0
- Excel Version(s)
- 2013, 2016
Dear Experts,
I am trying to use the VBA for getting a filtered list of due activities based on due dates for the next approaching 5 days includes today but could not able to do so and with using the current script I am able to get only todays due activities and not for next 5 approaching days. I am not sure where is the disconnect. Request to you please do help me on the same.
I am trying to use the VBA for getting a filtered list of due activities based on due dates for the next approaching 5 days includes today but could not able to do so and with using the current script I am able to get only todays due activities and not for next 5 approaching days. I am not sure where is the disconnect. Request to you please do help me on the same.
Code:
Sub due()
Application.ScreenUpdating = False
With Sheets("Expected Output")
.[A3].CurrentRegion.Offset(1).Clear
.[Z1:Z4].Value = Application.Transpose(Array("Due Date", "Daily", "As Needed", "As Received"))
.[Z5:Z10].Value = Evaluate("TEXT(TODAY()+ROW(1:6)-1,""dd.mm.yyyy"")")
Sheets("Details").[A3].CurrentRegion.AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=.[Z1:Z10], CopyToRange:=.[A3:G3]
.[Z1:Z10].Clear
End With
Application.ScreenUpdating = True
End Sub
Attachments
Last edited by a moderator: