A VLOOKUP() might handle most of the IFs in the middle, but I see you're doing some odd stuff at the end.

Perhaps if you just briefly described what you're trying to total with all those IFs, maybe there's a simpler test we can offer.