Forum Discussion
Luxio1997
Feb 15, 2023Brass Contributor
Automatic entry of times based on conditions
Hello everyone. For weeks now, I've been going crazy looking for a way to solve the problem I'm about to present to you. I have attached the sheet I prepared. In the "HOUR" column there is a...
Luxio1997
Feb 18, 2023Brass Contributor
Hi SnowMan55, beautiful solution but I have a problem: I checked and this formula doesn't exist in the Office 2013 package. How can we fix it?
HansVogelaar
Feb 18, 2023MVP
In D5:
=IF( WEEKDAY(C5,1)<>1, "", INDEX(IF(OR(MONTH(C5)={7,8}),N$4:N$5,IF(AND(C5>=M$1,C5<M$2),M$4:M$7,L$4:L$7)),COUNTIF(C$3:C5,C5)))
Fill down. See attached version.
- Luxio1997Feb 18, 2023Brass ContributorHi Hans, great answer.
Now there is another problem: in column C (the date column) there is the formula (for example in C5):
=IF( D4="", C4+1, IF(D4>TIME(18,0,0), C4+1, C4) )
This creates the problem that D4 will never be empty because every day there will always be times.
What can be the solution?- HansVogelaarFeb 18, 2023MVP
- Luxio1997Feb 18, 2023Brass Contributor
Now that there are no other times it is valid; but when I enter the times on the other dates (for example Monday 2 January), since it is no longer empty, it will return me twice on Monday.
What can be done to avoid this problem?