At 09:44 28/02/2010 -0800, Brewster Gillett wrote:
I have a list of names and addresses I maintain using OpenOfficeCalc. It does just fine - I don't need any database features. But I was handed a decidedly odd "SORT" screwup this morning.

I intended to sort by ZIP. The lowest numerical ZIP is 97005, and the highest one that would appear in the list is 98685. So I went to "DATA", "SORT", and instructed it to sort by only one column - column "J", the ZIPcode column.

What I got back was a list whose sort began, as expected, with 97005. Proceeded on nicely in fine numerical order, right on through to 98685. Trouble is, that only covered up through the 271st item of the 337-item list. Following the 98685, it began over again with a new 97005, and proceeded on through the numbers from there.

This is an incomprehensible error, and calls into question the integrity of the code, big-time ...

Either that or the care taken by the user? Let's be fair: you need to test and reproduce such a problem before you can rightly assume that it is a bug.

... because I cannot come up with any form of operator error that could have caused such a thing.

Perhaps I can help: may I please suggest such an error?

Are these values numbers? If they are US "ZIP" postal codes, they may need to include leading zeroes. You can display these using the "leading zeroes" formatting option, of course, but you may have preferred to enter the values as text. Or you may just have done this accidentally, by stripping the codes from addresses. If so, is it possible that some of your text values have leading blanks? If so, the ones with such leading blanks will quite properly sort before those without.

There is zero discernible difference in the cell entries of column "J" that are appearing out of sequence.

If you have your data displayed right-aligned, there will indeed be no visible difference.

Alternatively, are some of your values numbers and others text? Try View | Value Highlighting: are they all black (text) or all blue (numbers) - or a mixture?

So how is this happening, and what must we do to fix it?

Er, attend carefully to data types? (At least, try this before dismissing the problem as a bug.)

I trust this helps.

Brian Barker


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@openoffice.org
For additional commands, e-mail: users-h...@openoffice.org

Reply via email to