Google Sheets – Array Expansion with Offset

google sheets

I'm building a spreadsheet that shows bonuses granted to an employee that vest and pay out spread over the following three years.

Easier just to see the example:
https://docs.google.com/spreadsheets/d/1ZNLdun9PwSbfE6FSSmCatfqy2OQWp4rPKPujONbIoDg/edit?usp=sharing

In the first sheet, I have it working ok, but for every new year I have to manually place the {x/3, x/3, x/3} array formula into the correct year that vesting should start.

I want it work like the second sheet, where I just add new data to the green section, and the 3 payouts appear starting in the following year. In column C, I've calculated the offset where payout should begin. I just need a way for the array formula to start expansion at that offset.

Note that sometimes there's more than one grant per year, if that matters.

Best Answer

  • paste in C4 cell and drag down:

    =IF(LEN(B4), {REGEXEXTRACT(
     REPT(" ",   MATCH(DATE(YEAR(A4), 1, 1), C$3:$3, 0)), 
     REPT("(.)", MATCH(DATE(YEAR(A4), 1, 1), C$3:$3, 0))), 
     {B4/3, B4/3, B4/3}}, )

0