Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub RepDate()
- Dim ReportDate As Date
- ReportDate = Application.InputBox(MsgGP, TitleMsg, FormatDateTime(Date, vbShortDate), Type:=1)
- 'below line, when active is working fine; the second line which is an attempted improvement on the first, is throwing error
- 'Range("AM3").Formula = "=COUNTIFS(R:R,"">=""&TODAY(),R:R,""<""&TODAY()+1,C:C,""Incident"",L:L,"">=""&TODAY(),L:L,""<""&TODAY()+1,O:O,{""Closed"",""Resolved""})"
- Range("AM3").Formula = "=COUNTIFS(R:R,"">=""&format(date(ReportDate,""dd/mm/yyyy"")),R:R,""<""&TODAY()+1,C:C,""Incident"",L:L,"">=""&TODAY(),L:L,""<""&TODAY()+1,O:O,{""Closed"",""Resolved""})"
- End Sub
Add Comment
Please, Sign In to add comment