Apply a percentage each last day of the month based on a value for that month

I have a situation like this one:
1.ods (30.7 KB)
1
I want to apply a percentage ?% of the monthly value, that applies only on the last day of each month: like 10% of 1000 on 31/12 and so on, …, and the rest of the cells to show 0.
How can i write a function in B2, so that it applies automatically to all rows, to not do it manually?
Thank you.

1.1.ods (38,7 KB)

@PKG
The file you sent me works well for both solutions, but on my file the first solution gives me a #Value! error, the second solution gives: Err:504.
I have the LibreOffice 25.8.5.2 580(Build:2) version on linux mint.

You obviously didn’t notice that these are array formulas.
The formula must be entered using Ctrl + Shift + Enter.

Alternatively, you can also check the box in the function wizard.


1 Like