I am once again requesting your help, because I am stupid.
In order to most accurately model stock market fluctuations (sometimes called "opportunities", depending on the context), I have decided to avoid inputting "number of points" on a daily basis.
Instead, I wish to take the total overlay of fluctuation/opportunity over the week, by the end of the week, as of the end of the last working day of the week.
Let us designate the total number of points in a week with 5 full working days, the fluctuations/opportunities, as "x"
Every year, beginning at the start of January 1st, x increases by p.
Number of working days in a week with no holidays = d
Number of working days in a week minus holidays, if holidays occur on a workday = wd
I want a formula that inputs x ONLY on a Friday, 6, if the working week has 5 full working days, Mon - Fri,
And, that inputs (x divided by d, multiplied by wd) on an earlier day, when the full working week is truncated by any holiday,
Which I have listed in the "Holidays" sheet,
Using only one and the same formula.
Upto now, I have
=if(and(year(a1)=2025;weekday(a1)=6...); 1013.5; ...)
Where x = 1013.5.
I already know how to do the p increase part.
The part I don't know how to input, and input it in the shortest and most beautiful way possible, with least extraneous "fuss" is:
On weeks where Friday is a public holiday, it would be (1013.5/5 multiplied by 4), in the Thursday row, when Thursday is the last full day of the working week.
On weeks where Monday is a public holiday, it would be (1013.5/5 multiplied by 4) in the Friday row, when Friday is the last full day of the working week.
On weeks where Thursday and Friday are public holidays, it would be (1013.5/5 multiplied by 3), in the Wednesday row, when Wednesday is the last full day of the working week.
On weeks where there are only two working days, such as the Christmas and New Year period, it would be (1013.5/5 multiplied by 2)...
I have attached a dummy version of the folder.
Thank-you,
| Edit: Changed subject, was Formula that inputs a number on specific days at the end of a working week Make your post understandable by others -- MrProgrammer, forum moderator |