Forum Discussion
Count an Excel Cell with a Date
Make sure that you format the cell with the formula as General.
In the example below, there are 4 dates in the future, so there are 10-4 = 6 available.
- skobuffsJun 27, 2022Copper Contributor
HansVogelaar Okay, I had the cell with the formula (I2) formatted as Date. Changed it to General. I left the H column formatted as date, but it's still not counting properly. Any other thoughts?
- skobuffsJun 27, 2022Copper ContributorHansVogelaar Just figured it out. When I put in 6/30/22 it isn't reading that as a date. I have to put 30/6/22 and then it works. That's weird. I thought formatting that whole column as date would make the date a date with the format MMDDYY no matter how it was entered...
- HansVogelaarJun 27, 2022MVP
You must always enter a date according to your system date settings, regardless of the date format of the cell.
- HansVogelaarJun 27, 2022MVP
I notice that the value 6/30/22 is left-aligned - that might indicate it's a text value. What happens if you select that cell, press F2 then Enter?
If that doesn't help:
Could you attach a sample workbook (without sensitive data), or if that is not possible, make it available through OneDrive, Google Drive, Dropbox or similar? Thanks in advance.