Trying to Generate Days Between a Start Date and End Date
I have a request that once we have 4 requests on one specific date, that those rows change color and indicate that the day is full. I can get a formula to generate based on the start or end date, but not the dates between. Example, maybe the start is 10-14 and end is 10-18. Than I have two requests with start and ends on 10-16, and than maybe a 10-16 through 10-17. As you can see there is these four requests overlap on 10/16 and that day should be considered "full". How do you indicate there are 4 tasks that are all overlapping on one day, and than flag my check box that that day is full with a date that is "in-between. I have tried AI'ing it and I cannot get anything to work for just the first part of somehow a specific date.
" the start and end?
Answers
-
This is a way to do it.
The two sheets in my example are 4TasksMain and 4TasksDates
Create a second sheet called 4TasksDates which contains Dates and a formula to count how many times that date occurs. Then Vlookup (or IndexMatch) to pull the count to the 4TasksMain sheet.
Here is an example.
Task Count formula:
=VLOOKUP([Start Date]@row, {4TasksDates Range 1}, 2)
Once Task Count is greater than 4, you can put in the logic you want to highlight it.
Create second sheet and pre-populate with dates. It may be easier to generate from another program like Excel and then import or paste them in.
Formula for Task Count:
=COUNTIFS({4TasksMain Start Date}, <=Date@row, {4TasksMain End Date}, >=Date@row)
-
I did as you said and all I am getting is 0s on my helper sheet, and no match on my main? What am I doing wrong?
Main Log:
-
You don't need a second sheet or anything like that. Give this a try:
=IF(COUNTIFS([Start Date]:[Start Date], @cell <= [End Date]@row, [End Date]:[End Date], @cell >= [Start Date]@row) >= 4, 1)
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!