Hi All,
Firstly thanks for taking the time and reading my post.
I've got an excel file full of data and Column "E" contains multiple dates. The user inputs the specified date and then I would like the VBA program to count the number of times this date and any exceeding dates appear.
For example User Input "20/01/2015", I'd like the amount of times "20/01/2015", "21/01/2015", "22/01/2015"....+N
I've tried to use the code below to achieve this and I cannot get the greater than symbol to work! The file will calculated everything up to the first date on the spreadsheet, i.e. the 19/01/2015 but when it reaches the 20th it pulls back 0 results
Thanks for any constructive feedback,
Sub ColumnData()
Dim InputDate As Date
InputDate = InputBox("Enter Key Date", (CDate(InputDate)))
MsgBox ("The Value is " & InputDate)
'Function to Countif (DATES)
Range("C1").End(xlDown).Offset(1, 0).Formula = Application.WorksheetFunction.CountIf(Range("G3:G50"), ">" & InputDate)
End Sub
Bookmarks