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 20, 2023Brass Contributor
Hi SnowMan55 and HansVogelaar ,
thank you for all the effort you are putting into this problem of mine.
Practically the formula in D4:
=IF(WEEKDAY(C15;2)<>7;"";INDEX(IF(OR(MONTH(C15)={7\8});N$4:N$5;IF(AND(C15>=M$1;C15<M$2);M$4:M$7;L$4:L$7));COUNTIF(C$3:C15;C15)))
is perfect but instead of the "" (and therefore the result equal to empty text) put a function (I imagine similar to the same) that allows me to put the "fer" times (ie every day except Sundays).
- HansVogelaarFeb 20, 2023MVP
That won't work.
- Luxio1997Feb 22, 2023Brass ContributorI fixed it!
Now how do I view only the dates up to December 31st?
Because in this way it also inserts dates after December 31st, up to the cell where the formula was dragged.- HansVogelaarFeb 22, 2023MVP
In C5:
=IF(C4="", "", IF(D4="", IF(YEAR(C4+1)<>$B$1, "", C4+1), IF(D4>TIME(18,0,0), IF(YEAR(C4+1)<>$B$1, "", C4+1), C4)))
In D5:
=IF(C5="", "", 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.