completeexcelnoob
New Member
- Joined
- Jun 20, 2015
- Messages
- 4
Dear all,
I have a range filled with dates as such:
[TABLE="class: grid, width: 90"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: center"]Date[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]01/07/2015[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]01/08/2015[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]01/09/2015[/TD]
[/TR]
</tbody>[/TABLE]
I am planning to use Worksheetfunction.countifs to count the number of dates that are smaller than today's date as one criteria. In excel this would have been done with
However, I can't for the life of me seem to replicate this in VBA (getting errors). What is also important is that cells with blank dates are not counted at all (i.e. false) as COUNTIFS does.
Many thanks in advance.
I have a range filled with dates as such:
[TABLE="class: grid, width: 90"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: center"]Date[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]01/07/2015[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]01/08/2015[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]01/09/2015[/TD]
[/TR]
</tbody>[/TABLE]
I am planning to use Worksheetfunction.countifs to count the number of dates that are smaller than today's date as one criteria. In excel this would have been done with
Code:
=COUNTIFS(A2:A5,"<"&TODAY())
Many thanks in advance.