[Solved] Sorting Numbers after calculations

Discuss the spreadsheet application
Post Reply
Boothulu
Posts: 3
Joined: Sun Feb 17, 2019 6:29 pm

[Solved] Sorting Numbers after calculations

Post by Boothulu »

I have 16 names and numbers that I want to sort highest to lowest. The numbers are averages so their value will change. Is there a way to have these 16 lines sort automatically as I change the source of the averages?

For example take 3 people who perform a task for 7 days. Each day the number of times they complete the task changes. If MIke has the highest average for those 7 days I want his name sorted first on a list, followed by the runner up, and so on. If I only want to change the number of times the task was completed for Wednesday because Tom actually did more that day and it makes him the new leader how can I have my list automatically sort to reflect the change?
Last edited by Hagar Delest on Mon Feb 18, 2019 9:10 am, edited 1 time in total.
Reason: tagged solved
OpenOffice 4.1.5 in Windows 10
User avatar
RusselB
Moderator
Posts: 6646
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: Sorting Numbers after calculations

Post by RusselB »

Welcome to the Forums.
A macro could do what you are wanting, as it can be associated with the event 'Modified' status has changed.
I am not an expert with macros, and suspect that this may be more work than what it's worth.

In the Standard toolbar, by default, I see two buttons marked Sort Ascending and Sort Descending. These automatically sort in ascending or descending order based on the information in the column that the cursor is in.
This may give you unwanted extra results, but it's the option I would recommend.
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
Boothulu
Posts: 3
Joined: Sun Feb 17, 2019 6:29 pm

Re: Sorting Numbers after calculations

Post by Boothulu »

That sounds pretty much like what I'm looking for. The sort ascending/descending does exactly what I need it to... I just want it to sort as soon as a change is made :/
OpenOffice 4.1.5 in Windows 10
User avatar
Lupp
Volunteer
Posts: 3542
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: Sorting Numbers after calculations

Post by Lupp »

I have 16 names and numbers that I want to sort highest to lowest. The numbers are averages so their value will change.
Where are the numbers the averages are calculated from? How do you keep the association between the primary values and the averages?

For such a small number -in specific a fix one- of rows (data-couples) a sorting by helper formulas would be efficient enough. The original entries stay in place then.

See attachment.
Attachments
aoo97042Ranking_1.ods
(15.77 KiB) Downloaded 91 times
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
Boothulu
Posts: 3
Joined: Sun Feb 17, 2019 6:29 pm

Re: Sorting Numbers after calculations

Post by Boothulu »

Lupp wrote:
I have 16 names and numbers that I want to sort highest to lowest. The numbers are averages so their value will change.
Where are the numbers the averages are calculated from? How do you keep the association between the primary values and the averages?

For such a small number -in specific a fix one- of rows (data-couples) a sorting by helper formulas would be efficient enough. The original entries stay in place then.

See attachment.
This is exactly what I needed it to do. The numbers are all on the same sheet, exactly as you did it. TY!!!! Now for the sake of actually knowing how its done vs. just getting the answer. What is the point of the Helper1 and Helper2 rows? I'm trying to dissasemble the formula to understand it. My knowledge of calc is limited. =\
OpenOffice 4.1.5 in Windows 10
User avatar
Lupp
Volunteer
Posts: 3542
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: [Solved] Sorting Numbers after calculations

Post by Lupp »

It's a hard fate to be equipped with a teacher's soul: You expend hours trying to give explanations when asked - and next time you will be asked the same questions.

Well, I enriched my example with slightly reworked data (concening the stable/antistable issue) and with explanations. See new attachment!
Attachments
aoo97042Ranking_2_WithExplanations.ods
(24.07 KiB) Downloaded 91 times
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
Post Reply