Apr 03 2024 11:47 AM
Apr 03 2024 11:47 AM
Hi there, I got a question for you. Imagine, in columns B and C I have the dates and times of my appointments. As you can see, I have two appointments per Sunday. Now, how can I in column G create a list with only those Sundays where I can have an appointment at 10:00 hours where I have at least 5 (see E2) hours to the next appointment? In this particular case, this should only be 28.04.2024. Thank you in advance!
Apr 03 2024 12:24 PM
@Deleted
=LET(dates, UNIQUE(B2:B9), earliest, MINIFS(C2:C9, B2:B9, dates), FILTER(dates, earliest>=TIME(10, 0, 0)+E2))
Format the spill range of this formula as a date.
With slightly different data:
Apr 05 2024 05:27 AM
Thank you very much, my landgenoot. This is already a great help! I've edited the file a bit. In E2 I now have the time, that I want to find an appointment for and in E3 I now have the minimum hours between the starts of appointments. The first question I have is, how can I change the formula in G2 so that when I enter e.g. 21:00 in E2, 28.04.2024 pops up in G2? The second question I have is, how can I change the formula in G2 so that when there are no results it says e.g. "No results" (instead of "#CALC!"). And the third question I have is, as you can I see I have added Sundays in May when I don't have appointments yet. How can I change the formula in G2 so that these open Sundays are included, as well? Thank you very much in advance!
Apr 05 2024 06:55 AM
@Deleted
See the attached version. I used a helper column; it is undoubtedly possible without that column too but it'd be more complicated.
Apr 05 2024 07:45 AM
Apr 05 2024 09:34 AM
@Deleted
Apr 05 2024 09:48 AM
Apr 05 2024 09:56 AM
@Deleted
Is 22:00 the latest time an appointment can end, or is it the latest time an appointment can begin?
Apr 05 2024 10:03 AM
Apr 05 2024 10:45 AM
@Deleted
I'm confused.
In your sample workbook, you have appointments on the same day at for example 15:00 and 16:00, and yet you state that you want 5 hours between the start of appointments. How does that work?
Apr 05 2024 10:51 AM
Apr 05 2024 11:30 AM
@Deleted
Let's say you have appointments on 7:00 and on 17:00 on the same day, and that the requested time is 12:00. Do you want to include this date too?
Apr 05 2024 11:32 AM
Apr 05 2024 11:40 AM
Solution@Deleted
Here is a first attempt. It may need additional tweaking.
Do not change the formulas in column D.
Apr 05 2024 01:29 PM
Apr 05 2024 11:40 AM
Solution@Deleted
Here is a first attempt. It may need additional tweaking.
Do not change the formulas in column D.