OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

sorting muliple sheets that reference

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
DaveQB
Power User
Power User


Joined: 17 Apr 2004
Posts: 50
Location: Sydney

PostPosted: Thu Mar 30, 2006 7:27 am    Post subject: sorting muliple sheets that reference Reply with quote

I hope i can explain this good


The first sheet i have in my spreadsheet is a list of name with additional info about the people. The second sheet reference the first name and surname column and then has other info about these people.

I have since added more people to the bottom and now want to alphabetically sort the first sheet (and second sheet) without messing up the spreadsheet.

Is there a way to do this ???

Sorting the first sheet leaves the second sheet referencing the incorrect names and 'corupts' the data.
_________________
OOo 1.1.5
OS: Kubuntu 5.10 "Breezy Badger"
Back to top
View user's profile Send private message
denmarks
OOo Enthusiast
OOo Enthusiast


Joined: 01 Mar 2006
Posts: 125
Location: Chico, CA

PostPosted: Thu Mar 30, 2006 9:22 am    Post subject: Reply with quote

When you create a range always leave an extra line at the top and bottom so you can insert items. When you sort do not sort these 2 lines.

FIRST NAME
xxx
yyy
zzz
--END OF FIRST NAMES --

Define the 5 items as the range.
Always insert lines after the heading and before the last line.
Only sort data, not the header and last line.
_________________
Dennis Marks
Back to top
View user's profile Send private message Visit poster's website
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10065
Location: Germany

PostPosted: Thu Mar 30, 2006 10:10 am    Post subject: Reply with quote

The first sheet has one single line for each person whereas the second one has zero, one ore more lines referring to a person on the first sheet?
The references to first sheet are simple refs like "=$Sheet1.$A13"?
Back to top
View user's profile Send private message
DaveQB
Power User
Power User


Joined: 17 Apr 2004
Posts: 50
Location: Sydney

PostPosted: Thu Mar 30, 2006 12:08 pm    Post subject: Reply with quote

Villeroy,
Second sheet has 1 line per name/person like the first sheet.

Second sheet has references like this :

=Players.C24

Where 'Players' is the name of the first sheet.


denmarks,

I am confused how thats going to help.
_________________
OOo 1.1.5
OS: Kubuntu 5.10 "Breezy Badger"
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10065
Location: Germany

PostPosted: Thu Mar 30, 2006 12:42 pm    Post subject: Reply with quote

Using one row for each person: Why not everything in one table?
Then play with Window>Split, Window>Freeze or select some columns and call Data>Group..."by Columns". The latter adds some buttons above the headers allowing you to hide/unhide columns quickly.
If there is some reason for separate sheets and you are not familiar with databases:
Select col A and insert a new column.
Assumed labels in the first row, add 1, 2, 3 in A2:A4, select A2:A4 and drag down. Now you have a unique number for each item.
Apply the same to the other sheet, so the same number refers to the same person.
Instead of =$Sheet1.$Axxx use something like:
Formula B2 =VLOOKUP($A2;$Sheet1.$A$2:$G$65536;2;0)
Lookup the value in exactly ($) column A, relative to this row (missing $) in first column of exactly $Sheet1.$A$2:$G$65536 and return the value in the second column of that range (red 2). The 0 indicates, that the search column can be be unsorted. "1" would use a slightly different mode, which is not required in this case.
Getting a free number for a new entry:
=Max($A$1:$A$65536)+1
A database could handle this automatically.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group