# Split an employees salary between two different departments

This article includes suggestions and workarounds. Content may not be accurate for all use cases or represent best practices for the latest release.

## Question

I have an employee whose salary needs to be split across multiple departments. How can I accomplish this?

## Answer

If an employee needs to be split into two or more rows, a number column should be added to the personnel sheet to determine what percentage of salary should go to each row. You can then utilize splits on the sheet so that each split represents a department that the employee is assigned to.

The **Partial Headcount** and **Headcount** formulas should then be revised to multiply by this new column as in the examples below. Notice that a ** ROW.DeptPct** function is added in each case, to represent the allocation percentage:

**Partial Headcount**

__Old Formula Example__

- monthfraction(ROW.StartDate,ROW.EndDate, this, 30)

__New Formula Example__

- monthfraction(ROW.StartDate,ROW.EndDate, this, 30)
***ROW.DeptPct**

**Headcount**

__Old Formula Example__

- if(versionmonth(this) >= versionmonth(ROW.StartDate) and (isblank(ROW.EndDate) or versionmonth(this) <= versionmonth(ROW.EndDate)), 1, 0)

__New Formula Example__

- if(versionmonth(this) >= versionmonth(ROW.StartDate) and (isblank(ROW.EndDate) or versionmonth(this) <= versionmonth(ROW.EndDate)), 1
***ROW.DeptPct**, 0)

Other formulas that reference the **Partial Headcount** and **Headcount** accounts will then be affected without revision, e.g. **Hours** and **Salary**. However, you will want to be sure to examine all formulas to see if others need to be modified. For example, the **PayRate** formula will likely need to be modified to include "Headcount>0" instead of the default "Headcount=1". Otherwise, raises will not be included in the **PayRate** calculation if headcount is less than one, which would be the case for any employee that is split across departments.

In addition, the decimal precision on the headcount and partial headcount accounts should be greater than zero so that they can display fractional values.