Guest User

Untitled

a guest
Oct 20th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. Sub RepDate()
  2. Dim ReportDate As Date
  3. ReportDate = Application.InputBox(MsgGP, TitleMsg, FormatDateTime(Date, vbShortDate), Type:=1)
  4. 'below line, when active is working fine; the second line which is an attempted improvement on the first, is throwing error
  5. '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""})"
  6. 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""})"
  7. End Sub
Add Comment
Please, Sign In to add comment