Explanation

The core of this formula is the MOD function.

The divisor is hardcoded as 3, since we want to do something every 3rd month.

For example, MOD(10,3) = 1.

Excel formula: Repeat fixed value every 3 months

The result of MOD carries the same sign as the divisor.

COLUMN Function

The Excel COLUMN function returns the column number for a reference.

For example, COLUMN(C5) returns 3, since C is the third column in the spreadsheet.

Excel formula: Highlight every other row

When no reference is provided, COLUMN returns the column number of the cell which contains the formula.

Excel formula: Sum every nth column

Excel formula: Copy value from every nth row

Excel MOD function

Excel COLUMN function