I need to count records in each 8h (starting from first adequate hour) during day (6-22) and in each 0,5h (starting from first adequate hour) during night (22-6). For example if there is 21:50; 22:20; 22:25; 22:30; 22:50; 23:05; 23:15; 23:45 then the first adequate hour for night is 22:20 and from it I would have to start counting. Consequently I would have to count how many records is between 22:20 and 22:50; 22:50 and 23:20; 23:20 and 23:50.There is attached example https://rg.to/file/a5973758f63cc9f6c837303cd7162b77/example.xlsx.html solved for two days in K column. Could you please help me?