# How to get values from a column

I have a column based on “dates” and “numbers”. I need to get the correct value based on other columns of “number repeat” and “percentage”.
I’m going around in circles trying to do this.
Thanks for any solutions.

Ball Number & date.ods (39.7 KB)

Update-
My OS is Ubuntu 22.04.1 and the version of LibreOffice is 7.3.7.2.

In other words what I am trying to list is the ball number based on how many times it was drawn and the date that it was drawn on.

Is this possible using a function command?
Again, thanks for any help with this.

If you give (where?) a number telling how often a ball was drawn, there mostly will be more than one ball of the kind.
If you have given or gotten a specific ball, there will be more than one date it was drawn on. What to display where then?
Everything will depend, of course on the range of dates within which draws occurred and the occurrences are to be counted.

You shouldn’t expect a useful answer if you not excplain more clearly what you actually want to achieve.
Be aware of the fact that you may find here many contributors knowing something about Calc, but obviously very few (none?) knowing of and being interested (in the same way as you) in any game where balls are drawn.

Your first problem is that you have added 4 to each subsequent date. This can cause rounding problems with ordinary numbers but it might be the root of the issue here where you cannot sort the existing table without getting `#VALUE!` errors.
In cell A2 you have a date 21/12/22, in the cell below, A3, enter 25/12/22. Select both cells, grab the bottom right corner and drag the dates down to cell A26. You will now have the same dates but they don’t rely on any other date. You could instead select the dates, copy and paste as Unformatted Text.
Now you click in the table, select Data > Sort and choose Times No Drawn as first sort field and Date Drawn as second sort field.

For recording such data I would be inclined to enter raw data into a plain table and use a Pivot table to sum, sort and analyse it.

1 Like