Forum Discussion
skobuffs
Jun 27, 2022Copper Contributor
Count an Excel Cell with a Date
Hello,
I have a sheet that has a list of 182 people that can buy a permit. I only want 10 active permits at any given time, so I want to set a counter at the top of the spreadsheet that shows how many permits are available. Since the permits will expire, though on different dates, I thought I'd use the COUNTIF function where the H column has the expiration date of the permit.
=10-COUNTIF(H6:H188,">=TODAY()")
My thinking was that any permit that is less than today would be expired and I wouldn't want it added to the total. For some reason this isn't working. Any ideas?
Thanks,
Marco
- skobuffsCopper ContributorI tried that one and it isn't working. I also made sure to format the H column as short date. Should I maybe use another format? Thanks for helping!
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.