Forum Discussion
COUNTIF to count cells with dates in them
- Jul 11, 2019
This solution might come handy. I have written the formulas above. The DATEVALUE returns a number if a valid date is passed to it. However, it requires the date in Text format. Therefore, I had to join it with and emptry string using the & ampersand sign. So, if a valid date will be encountered then you get a number as a result. We can check if the result is a number or not by using ISNUMBER and get an array of TRUE and FALSE. TRUE for all dates and FALSE for any text, simple numbers and wrong dates. Then we can simply use COUNTIF(range, "TRUE") which will give the exact number of cells containing the dates. This will also take care of blank cells in between. We'll always get a FALSE for the blank cells.
I hope that helps and improves the solution.
- bobbydean01Aug 22, 2024Copper Contributor
Hello and thanks for you post.
I want to reflect the value "1" in a separate cell for each time a date occurred in my date cell and the value "0" where it is blank. Ex: Dates = "1" and Blank = "0".
The goal is to then count the total of each date cells and show the difference in a separate cell.
I want make sure that it reflects each time the table is updated.
Thanks,