This results in 24 pay periods over the course of a year.

For example, in the worksheet shown above, payroll dates are the 1st and 15th of each month.

In the worksheet shown above, the formula solves this problem in two steps.

Formula for semimonthly pay dates on the 15th and last day of month

Step 1 is to generate a list of all dates between the start date and the end date.

Step 2 is to filter those dates so that only those that land on the 1st and 15th remain.

This makes the formula easier to read and understand, and also improves performance.

Formula for semimonthly pay dates on the 15th and last day of month

To test each for an “end of month” date, we use theEOMONTH function.

Inside, EOMONTH, we provide 0 for months to return the last day of the month.

As before, the two expressions are joined with addition (+) to createOR logic.

Formula for semimonthly pay dates on the 15th and last day of month

In the real world companies often adjust pay dates that land on a holiday or weekend to thepreviousbusiness day.

In this configuration, WORKDAY returns the original date if it is a working day.

Otherwise, WORKDAY steps back one day at a time and returns the first working day found.

Formula for semimonthly pay dates on the 15th and last day of month

Notice that four dates have been shifted back to thepreviousworking day.

SeePrevious working dayfor an example.

If it is, IF returns the date + 14 days.

Formula for semimonthly pay dates on the 15th and last day of month

The output from FILTER is dynamic.

If source data or criteria change, FILTER will return a new set of results.

The array can be one dimensional, or two-dimensional, determined byrowsandcolumnsarguments.

Using the WORKDAY function to adjust final dates

LET Function

The Excel LET function lets you define named variables in a formula.

Formula for semimonthly pay dates in older versions of Excel

Alternative formula for semimonthly pay dates in older versions of Excel

Excel formula: Biweekly pay schedule

Excel formula: List workdays between dates

Excel formula: Sequence of weekends

Excel formula: Get first day of month

Excel FILTER function

Excel SEQUENCE function

Excel LET function

Excel DAY function

Excel EOMONTH function

Excel WORKDAY function

Article image

Article image

Article image

Formula for semimonthly pay dates on the 15th and last day of month

Formula for semimonthly pay dates in older versions of Excel

Alternative formula for semimonthly pay dates in older versions of Excel