Quote Originally Posted by Burney View Post
Have you ever watched ‘Silicon Valley’, a?

There’s a whole bit where a lead character breaks up with a new girlfriend because she doesn’t indent.
=IF($Q27=1,IF(OR(AND($N27<W$4,$O27<W$4),AND($N27>W $5,$O27>W$5)),0,1),IF($Q27=2,IF(OR(AND($N27<W$8,$O 27<W$8),AND($N27>W$9,$O27>W$9)),0,1),IF($Q27=3,IF( OR(AND($N27<W$12,$O27<W$12),AND($N27>W$13,$O27>W$1 3)),0,1),IF($Q27=4,IF(OR(AND($N27<W$16,$O27<W$16), AND($N27>W$17,$O27>W$17)),0,1)))))

This is what happens when you have to write a complex conditional cell expression in Excel. It fits bookings into time-slots and the only way to design it was to write it in beautifully-indented pseudo-code so I could literally see the logical flow, then turn it into the gibberish up there.