Louise Emily
Louise Emily

Reputation: 11

Google Sheets Financial Year Formula

Using the below formula to calculate the Financial Year from the Date (G) column:

=IF(MONTH(G2)>4,YEAR(G2)&"-"&YEAR(G2)+1,YEAR(G2)-1&"-"&YEAR(G2))

It works for that specific cell - G2 but I'm wanting to apply the same formula to the entire 'Tax Year' column.

image

Tried pulling the box down on right lower corner but this clears my formatting (colours of row etc) and means that the formula won't automatically be applied when I insert a new row.

Upvotes: 0

Views: 1756

Answers (1)

rockinfreakshow
rockinfreakshow

Reputation: 30240

Try:

=INDEX(IF(LEN(G2:G),LAMBDA(z,IF(MONTH(G2:G)>4,z&"-"&z+1,z-1&"-"&z))(YEAR(G2:G)),))

Upvotes: 2

Related Questions