This question came from our site for professional and enthusiast programmers.

Do you have any part of the formula working in Excel?
–
James JenkinsMar 10 '13 at 20:28

If you check back, try posting the Excel Formula, as it is you are asking some to a broken LibreOffice so it will work in Excel, without any idea about what you are trying to do. stackoverflow.com/faq
–
James JenkinsMar 10 '13 at 21:03

Yes, I do. The first 8 columns have been resolved but "hard-coded" (if that makes sense in spreadsheets). At the present time, I can provide you the formula but not the Excel formula, as this is my requirement. This is the formula : ∑_n^2▒〖H_2*I_n+J_2*K_n+H_3*I_(n-1)+J_3*〗 K_(n-1)+⋯+H_(n-1)*I_3+J_(n-1)*K_3+H_nI_2+J_nK_2. Do you still want it in another format?
–
thitamiMar 10 '13 at 21:10

After you provided the guiding XLS, I understood that the calculation you need is actually more complex. Copying from your uploaded XLS, what you need are the following formulas, where each next cell in the row gets more complicated:

Corresponding picture (with a slight change in the formula, but I did not care to re-take the screenshot...):

I uploaded the corresponding workbook here. Of course, you have to edit some of the formulas to support longer columns. Or make everything completely dynamic, which is not too hard but results in long formulas.

If you do not like the view of the helper columns M and O, then you can hide them.

I think that you have got the point, Reinier. As a guide, I am attaching you a relevant xls link , to make it easier for me to explain it. Is it feasible to resolve it without the helper column ?
–
thitamiMar 10 '13 at 23:07

Thanks for the XLS, that made your question clear. I updated the answer and provided a response-XLS as well.
–
Reinier TorenbeekMar 12 '13 at 3:35

+1 for not trying to do it all in one cell. Too many people don't realise you have all these blank cells to make your life easier.
–
Hand-E-FoodMar 12 '13 at 5:29

That was a very helpful answer, Reinies. Much appreciated.
–
thitamiMar 13 '13 at 19:21