The date column in your data tab is confusing, as some cells are text instead of numbers (dates).
To correct that, try selecting the whole range, e.g. H13:H1000, and from the Data ribbon, select Text to Column.
Then in the dialog box that comes up leave the default option (Delimited) and press Next;
Uncheck all delimiters and press Next;
In the last step, select Date (leave MDY selected) and press Finish.
In the attached wb, to count based on dates smaller then 15, I use this formula in U56, copied across:
And this one in U57, for dates as 15 and later:
As the heading in row 46 is not Excel friendly for date reference, in the argument DATE(2021,COLUMNS($A$1:J$1),15) in the formulas above, I use COLUMNS($A$1:J$1), which results 10, the month represented in U46 (Year 2021, as I assume it should be).
As the formula is copied (dragged) across to V56, the month argument turns into COLUMNS($A$1:K$1) (11=November), then COLUMNS($A$1:L$1) (12=December), then COLUMNS($A$1:M$1) (13=January of 2022), and so on.
If you have to start count on other column, make sure you change that argument accordingly.
Please check if this will work for you.
Bookmarks