Source: http://www.twoinvesting.com/2016/09/automatic-estimation-of-monthly-dividends-for-google-sheets/