Help simplifying huge nested if statement?

Printable View