Ask Your Question
0

How to add the NUMBER to the record after SORTING

asked 2019-11-01 13:17:30 +0100

esde gravatar image

Hi all,

Is there any option to add a NUMBER/INTEGER value to the record after sorting?
it could be done in BASE or CALC, whichever is possible

Here is what I am trying to do:
- I have a table of records with many columns.
- Let's say it is a table with contestants (for example runners)
- the runners are running on 3 different distances, thus obtaining 3 differend results i 3 different colums (let's call them "time1", "time2" and "time3")
- I would like to sort the table using the "time" columns and specify a position for each runner in each of the three runs. (lets say the positions will be shown in columns called "score1", "score2" and "score3")
- for exaple runner1 in column "time1" have the best result so he should have NUMBER/INTEGER "1" in the column "score1", but he is not very good in long distances so he has the worst result in column "time3", thus should have the NUMBER/INTEGER "40" in the column "score3" (aasuming there are 40 runners)
- Thus the values in columns "score" should be updated automatically depending on the number of participants.
- It also should update while adding new values to "time" columns.

Once again. the solution could be for BASE or CALC. I cannot figure it out in any of those programms.
Thank you for any advice.

edit retag flag offensive close merge delete

Comments

Hi, if you use LO calc, you could try the RANK function.

gregors15 gravatar imagegregors15 ( 2019-11-01 13:27:17 +0100 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2019-11-01 13:30:47 +0100

keme gravatar image

Use the RANK() function with the optional third parameter = 1

edit flag offensive delete link more

Comments

Thank you. I've just found that function.

esde gravatar imageesde ( 2019-11-01 13:36:35 +0100 )edit

Please, if the answer solves the question click ✔.

m.a.riosv gravatar imagem.a.riosv ( 2019-11-02 01:30:36 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-11-01 13:17:30 +0100

Seen: 23 times

Last updated: Nov 01