https://bugs.documentfoundation.org/show_bug.cgi?id=105323

--- Comment #1 from Aprax <r...@jwcca.com> ---
I created a spreadsheet which contains 6 columns which contain the INDIRECT
formula. Cell N5 had a value of "0.692".
I then realized that I no longer wanted column G and I deleted it.
I then realized that the results for the columns containing INDIRECT were
terribly wrong. Cell N5 now had a value of "1.049". It shouldn't have changed.

Upon checking, I saw that the formulas for INDIRECT had not been modified to
completely take the deletion of column G into account and I had to modify each
formula myself.

The problem is caused by the INDIRECT formula using an integer to define a
column rather than a letter. In the example, cell N5 contains the formula 
=IF(H5=0," ",INDIRECT((ADDRESS((ROW()-$B5),14,2)))*H5)
where the integer "14" defines the 14th column which is equivalent to the
letter N.
When column G is deleted, the formula, now in cell M5, has been partially
modified, "H5" becomes "G5" but "14" remains the same.
=IF(G5=0," ",INDIRECT((ADDRESS((ROW()-$B5),14,2)))*G5)

"14" should have been changed to "13" as follows:
=IF(G5=0," ",INDIRECT((ADDRESS((ROW()-$B5),13,2)))*G5)

This might be avoided if instead of using the integer "14" the letter "N" had
been used which then would have been changed to "M". (at least I'd hope it
would).

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to