FORMULA TO COMBINE EMPLOYEE AND EMPLOYER HEALTH CARE AMOUNTS

SUGGESTED

I need to create a formula that will combine the employee and employer health care amounts for printing on the W2’s.  My problem is that there are 4 different health deduction id’s, 4 different health fringe id’s and an HRA fringe id.  I’m struggling to write the formula that will include all possible scenarios.  I have no idea why there are 4 different fringe codes, just one would have worked fine, but its too late now my company has been using all 4 for years.

I currently have 4 different formulas…

LOOKUP(Prior Year Deduction [PR Employee Deduct], Employee [Employee], “HOSP-E”) + LOOKUP(Prior Year Fringe [PR Employee Fringe], Employee [Employee], “HOSP-E”) + LOOKUP(Prior Year Fringe [PR Employee Fringe], Employee [Employee], “HRA”)

This formula is repeated 3 more times for “HOSP-EC”, “HOSP-EF” AND “HOSP-ES”. 

Any thoughts on how I can combine all into one formula?