[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libreoffice-users] Calc: moving/sorting rows on Sheet1 don't update formulas on Sheet2 that refer to them


Steve & Brian, thanks for your replies.

Despite decades of working on spreadsheets, I can't say I expected it.  But then, it's the first time I'd found myself in this particular scenario.  But after your first sentence, I think I can see the logic - even though I wish the spreadsheet was smarter.

I actually am doing a lookup from Sheet2.  But the food names on Sheet1 is the index column, and I'm using the lookup function to pull the calories, carbs, etc into Sheet2.  That's why I was sorting Sheet1 on the food names - both to make it easier for VLOOKUP to find a match, and to make it easier for me to create the link between the two sheets.

Unless someone has any other suggestions, I guess I'll have to remember to insert new rows wherever my noew foods need to be, and/or to use ALT+SHIFT to drag new rows to where I should have inserted them before I created them.  I'll probably also need to regularly use |Paste Special| to convert those formulas pulling the food names into Sheet2 into hard text, since this is more fragile than I expected it to be.

Perhaps there's a way to setup a pull-down pick-list to pull the food names into Sheet2?  Perhaps I can investigate that later.

-- Tim
===========================

On 4/9/2019 8:58 PM, Steve Edmonds wrote:
I get the same on 6.07, it is what I would have expected from a sort
(the contents of the cells are moved about, the cell positions are not
changed). Seems logical to me but possibly not the desired outcome for
others.
If you use a lookup function on sheet 2 (include an index for each row
for lookup ease) then you will return the right results regardless of
position in the lookup table. You just have to be careful adding extra
lines that they get included in the table.

On 10/04/2019 11:48, Tim Deaton wrote:
I'm building a spreadsheet to serve as a food diary.  On Sheet1 I have
a list of different foods, and on Sheet2 I have what foods I ate at
which day and meal.  So far, I've only got a couple of days' data posted.

As I add more meals, I eat items that are not already on the Sheet1
list.  So I add the new items to Sheet1, and sort that table again.
THAT's when the problem occurs.  I just added three new foods to the
bottom of the Sheet1 list, then sorted it.  Before sorting, the new
foods were in cells A38-A40.  After sorting, the new entries are all
above A30.

Before sorting Sheet1, the item in Sheet2, cell C5 contained this:
=$'Sheet1'.A33
After sorting Sheet 1, that Sheet2 cell reference should say
=$'Sheet1'.A36, but it still says "A33".

Is this a known problem?  I'm using LO v6.1.5.2 (x64) on Windows 7.



--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy

Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.