Lock header rows when sorting

Discuss the spreadsheet application

Lock header rows when sorting

Postby palm3ro » Wed Apr 22, 2009 1:08 pm

I have several rows with name and surname in two columns, and more information after that in more columns, now i would like to lock the rows so i can sort by name, surname and what ever, is that possible? I also would like to know if it are any easy way to sort by name surname or any other info that i choose.
Last edited by Villeroy on Wed Apr 22, 2009 8:30 pm, edited 1 time in total.
Reason: edited title
OOo 2.2.X on Ms Windows XP
palm3ro
 
Posts: 5
Joined: Wed Apr 22, 2009 1:01 pm

Re: Lock rows

Postby Hagar Delest » Wed Apr 22, 2009 2:05 pm

Do you mean freeze the window like that one: [Solved] Keeping the first Column visible as a label?

Thanks to add '[Solved]' at beginning of your first post title (edit button) if your issue has been fixed.
AOO 4.0.1 on Windows 7 and Xubuntu 13.10 (Saucy Salamander)
User avatar
Hagar Delest
Moderator
 
Posts: 25071
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Lock rows

Postby palm3ro » Wed Apr 22, 2009 5:44 pm

No thats not what i meant, what i mean are. Example, i have columns: name, surname, address, phonenumber, emailaddress and some more columns, if i sort the rows now so do i have to choose column to sort from, if i sort from column A the other columns doesnt show the right surname it only sort after column A and i want the whole row to be sorted. I want all cells in a row to be as one then i sort...
OOo 2.2.X on Ms Windows XP
palm3ro
 
Posts: 5
Joined: Wed Apr 22, 2009 1:01 pm

Re: Lock rows

Postby TheGurkha » Wed Apr 22, 2009 7:33 pm

Click in the column you want to sort by, but don't highlight the column. Then sort. I just tried it and all rows in all columns moved accordingly, not just the column I decide to sort by.
Ubuntu 13.04 Raring ringtail, LibO 4.0.2.2 (Build ID 400m0 (Build:2))
Gurkha Welfare Trust
User avatar
TheGurkha
Moderator
 
Posts: 6426
Joined: Thu Mar 13, 2008 12:13 pm
Location: North Wales, UK.

Re: Lock rows

Postby Villeroy » Wed Apr 22, 2009 8:03 pm

Having such a database-like list, it is recommended to select the entire list (incl. column labels) and give a name to it: Call menu:Data>Define... <descriptive_name> [Add], [OK].
menu:Data>Sort... lets you choose up to 3 columns, for instance first order by surname, equal surnames by forname, equal names by zip-code. Take notice of the additional options on the second tab of the sort dialogue.
Now this sort order is stored for the named database range. After editing the range you can call menu:Data>Refresh in order to apply the same sort order again.
When adding new rows to the list, always insert new rows rather than appending them into the blank space below. This way the named reference expands to the new size as well as all other references, for instance SUM(A2:A99) becomes SUM(A2:A100) when you insert row.
Likewise you delete rows in order to shrink the list.

TheGurkha wrote:Click in the column you want to sort by, but don't highlight the column. Then sort. I just tried it and all rows in all columns moved accordingly, not just the column I decide to sort by.

This detects the currently used region and sorts all rows including a first row of column labels and possibly a trailing row of calculated results (sum of column).
The quick-sort method by button works well if you keep a blank, hidden row below the column labels and then click a single cell in the data range.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 12.04, Apache OpenOffice 4.x
User avatar
Villeroy
Volunteer
 
Posts: 17238
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Lock header rows when sorting

Postby palm3ro » Wed Apr 22, 2009 8:48 pm

now i have solved it, but a new problems appeared, if i sort by ascending or descending from the standard menubar it also sort by the label and place the label within the database and not on the top of the database, how to solve that?
OOo 2.2.X on Ms Windows XP
palm3ro
 
Posts: 5
Joined: Wed Apr 22, 2009 1:01 pm

Re: Lock header rows when sorting

Postby Villeroy » Wed Apr 22, 2009 8:54 pm

Read the second part of my last answer. Use blank, hidden rows to separate the data range from column labels and other stuff.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 12.04, Apache OpenOffice 4.x
User avatar
Villeroy
Volunteer
 
Posts: 17238
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Lock header rows when sorting

Postby palm3ro » Wed Apr 22, 2009 9:19 pm

If i want to sort by phonenumber, zipcode or whatever, without to define sortorder in menu data sort, is that possible?
OOo 2.2.X on Ms Windows XP
palm3ro
 
Posts: 5
Joined: Wed Apr 22, 2009 1:01 pm

Re: Lock header rows when sorting

Postby Villeroy » Wed Apr 22, 2009 10:11 pm

Yes, it's possible. Insert a blank row below the column labels and then hide the blank row, so your list is separated from the headers.
Click a single cell in the column you want to sort by. Do not highlight anything, just click any data-cell below the column header.
Click the sort button.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 12.04, Apache OpenOffice 4.x
User avatar
Villeroy
Volunteer
 
Posts: 17238
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Lock header rows when sorting

Postby palm3ro » Wed Apr 22, 2009 10:21 pm

I tried that and it still sorts by name not the cell i mark within a column.
OOo 2.2.X on Ms Windows XP
palm3ro
 
Posts: 5
Joined: Wed Apr 22, 2009 1:01 pm

Re: Lock header rows when sorting

Postby Villeroy » Wed Apr 22, 2009 10:51 pm

I just see that you are using a very old version which is the reason why it does not work as desired. Current version is 3.0.1. Version 3.1 will be released next week or so.


Sorting improvements

A - B - C - D - E - F - G. You would think there isn't much left to do with sorting, but OpenOffice.org 3.1 brings no less than four improvements to sorting cells in Calc. They are keeping cell notes with their contents, identifying the default column for the sort toolbar buttons, not sorting column headers, and stable sorting. In previous versions, the unstable sorting would yield random results in certain situations.

http://www.oooninja.com/2009/01/openoff ... tures.html
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 12.04, Apache OpenOffice 4.x
User avatar
Villeroy
Volunteer
 
Posts: 17238
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany


Return to Calc

Who is online

Users browsing this forum: No registered users and 15 guests