It's probably best if you put some worked examples together and run it passed your HR/Accounts/Legal staff to make sure you're correctly interpreting as there's usually some complexities (e.g. what if an Employee is Opted In for a part of a year?).
<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: center"]Employee[/TD]
[TD="align: center"]Opted In=1,
Out=0
[/TD]
[TD="align: center"]Salary[/TD]
[TD="align: center"]Percent[/TD]
[TD="align: center"]Employee Contribution[/TD]
[TD="align: center"]401K Matched[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]Fred[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]$20,000[/TD]
[TD="align: center"]1%[/TD]
[TD="align: center"]$200[/TD]
[TD="align: center"]$50[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]Susan[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]$100,000[/TD]
[TD="align: center"]2%[/TD]
[TD="align: center"]$2,000[/TD]
[TD="align: center"]$500[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]Charlie[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]$25,000[/TD]
[TD="align: center"]3%[/TD]
[TD="align: center"]$750[/TD]
[TD="align: center"]$188[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]Vanessa[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]$2,000,000[/TD]
[TD="align: center"]5%[/TD]
[TD="align: center"]$100,000[/TD]
[TD="align: center"]$500[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]Toad[/TD]
[TD="align: center"]0[/TD]
[TD="align: center"]$50,000[/TD]
[TD="align: center"]2%[/TD]
[TD="align: center"]$1,000[/TD]
[TD="align: center"]$0[/TD]
</tbody>
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]E2[/TH]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]F2