in reply to if statement consolidation
If I may say, that's a pretty ugly if , IMHO ;)
So maybe that's a signal that you're going about it in the wrong way. Try restating the original problem and think of a different approach.