=IF((E6 - D6) >= TIME(6, 0, 0),
IF((E6 - D6 - TIME(0, 45, 0)) >= TIME(8, 0, 0),
IF((E6 - D6 - TIME(0, 45, 0) - TIME(0, 15, 0)) >= TIME(8, 0, 0),
E6 - D6 - TIME(0, 45, 0) - TIME(0, 15, 0),
TIME(8, 0, 0)),
E6 - D6 - TIME(0, 45, 0)),
E6 - D6)
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme