I have a worksheet that contains some product prices with a Date From value.
Currently all the dates in the table are set to 1 Jan 25 except the final row of the table (row 3478) set as 2 Jan 25.
The column containing the dates is formatted as a date format
Using the TODAY() funtion that returns todays date of 7 Jan 25, when I do an Excel function to count the number of instances of a date value > todays date (7 Jan 25) - 6 days to establish how many instances of dates >1 Jan 25, I get a return of 1 as based on the above image
And when i want to see how many instances there are of date values > TODAY()-7 (31 Dec 24) I get a return of 3,472 which is the exact count or rows in the table
When I want to do the same in VBA
The current date - 6 days (i.e. 1 Jan 25) returns 1 as expected
But doing the same for the current date - 7 (i.e. 31 Dec 24) I get 0 when it should return 3,472
This makes no sense at all and I have no idea what Excel/VBA is doing.....
Can anyone shed some light on this?
TIA
Currently all the dates in the table are set to 1 Jan 25 except the final row of the table (row 3478) set as 2 Jan 25.
The column containing the dates is formatted as a date format
Using the TODAY() funtion that returns todays date of 7 Jan 25, when I do an Excel function to count the number of instances of a date value > todays date (7 Jan 25) - 6 days to establish how many instances of dates >1 Jan 25, I get a return of 1 as based on the above image
And when i want to see how many instances there are of date values > TODAY()-7 (31 Dec 24) I get a return of 3,472 which is the exact count or rows in the table
When I want to do the same in VBA
The current date - 6 days (i.e. 1 Jan 25) returns 1 as expected
But doing the same for the current date - 7 (i.e. 31 Dec 24) I get 0 when it should return 3,472
This makes no sense at all and I have no idea what Excel/VBA is doing.....
Can anyone shed some light on this?
TIA