Ask Your Question

Random number selection/series; text format

asked 2017-01-10 19:44:54 +0200

JG101 gravatar image

I would like LO to generate a set of numbers from different column of numbers and come up with 5 digits (generate 1 digit number from each column, but not have a duplicate number from any of the columns) for each run.

Is this possible? would someone be able to forward an example

I manually highlighted Text for each number that was represented in different columns – is there a way to automatically do this ?

please see document Generate Random number - format text color duplicating numbers in each column 01-10-2017.ods

edit retag flag offensive close merge delete


This is just an idea, but it is not working perfectly (number can repeat). But maybe you will get some other idea :-)

Ljiljan gravatar imageLjiljan ( 2017-01-10 20:50:33 +0200 )edit

Please upload file here instead of using Dropbox , if u don't mind thank you

JG101 gravatar imageJG101 ( 2017-01-10 21:43:43 +0200 )edit

Well, I cannot upload it as comment and it is not the solution to your problem so I cannot upload it as the answer... but at the moment you can download it.

Ljiljan gravatar imageLjiljan ( 2017-01-11 08:14:21 +0200 )edit

This looks interesting in a sense but I simply don't understand. Would you ( @JG101 ) mind to give additional explanations and examples of acceptable results?
Do you mean "generate" in the sense of "select"?
What do the colours exactly mean? There are the numbers 2 and 37 in specific I cannot understand the colouring of. In the other cases the turquoise text colour is supposed to say "more than one occurrence".

Lupp gravatar imageLupp ( 2017-01-11 14:56:06 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2017-01-11 15:16:40 +0200

Lupp gravatar image

updated 2017-01-11 21:35:40 +0200

To explain my comment above I attach a reworked version of the supplied spreadsheet document.
This attachment may later get removed!

(Editing with respect to the first comment below:)

"Is it possible to have the doc generate all possible outcomes?"
Of course. Its just a bit boring. The generator I made is ugly, rather inefficient and has about 25MiB on disk. If I understood your conditions correctly there are 83776 combinations meeting them based on the 5 x 10 scheme you gave. The collection of the results without any formulae has 999KiB here. Let's try if I can attach it.

edit flag offensive delete link more


Reviewed doc. looks great. numbers 2 and 37 i accidentally left those out by mistake. Not intentional. If all numbers are included for each column would the result be able to exclude already chosen number if that same number was in a different column.

Is it possible to have the doc generate all possible outcomes?

JG101 gravatar imageJG101 ( 2017-01-11 16:00:00 +0200 )edit

" If all numbers are included for each column would the result {process} be able to exclude already chosen numbers..."
This would of course require a specification where to get the replacement from - or if it the number should be simply omitted.
To generate tuples of numbers under any given specifications is often feasible by general programming. In simple casees it may also be done by spreadsheet formulae with sufficient efficiency.

Lupp gravatar imageLupp ( 2017-01-11 17:22:05 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-01-10 19:44:54 +0200

Seen: 75 times

Last updated: Jan 11 '17