numeri casuali
-
Ciao a tutti,
vado subito alla domanda principale
posso inserire in un testo formattato in colonne, una colonna con numeri casuali?
ringrazio tutti per la collaborazione
Ste -
@Stefano-Brovelli
Please consider posting in english, even if you also want to include your own language. Most members are well versed in english and this is also mentioned in one of the FAQ posts.Remember, it is you who wants an answer, so it makes sense to not put difficulties in front of those willing to help.
Terry
In this case I have used Google translate to get:
Hi everyone,
I’ll get straight to the main question.
Can I insert a column with random numbers into a text formatted in columns?
Thank you all for your help. -
@Terry-R
many Thanks
sorry
Stefano -
Hello, @stephano-brovelli and All,
From wikipedia, for example, here is the list of the
20most common surnames in England, which will be our INPUT text :Surname Percentage Smith 1.26 Jones 0.75 Taylor 0.59 Brown 0.56 Williams 0.39 Wilson 0.39 Johnson 0.37 Davies 0.34 Robinson 0.32 Wright 0.32 Thompson 0.31 Evans 0.30 Walker 0.30 White 0.30 Roberts 0.28 Green 0.28 Hall 0.28 Wood 0.27 Jackson 0.27 Clark 0.26So, let’s suppose you want to insert, a column of random numbers between the
SurnameandPercentageexisting columns. Follow this road map :-
First, determine the number of rows of your list : in our example we have
20rows -
After your list, create
20consecutive empty lines -
Move back to the beginning of these empty lines
-
Open the Column editor (
Alt + C)-
Select the Number to Insert option
-
Chose
1for each option and Zeros or Spaces for leading characters -
Select the
DECformat -
Click on the
OKbutton
-
=> Of course, you’ll get this simple list :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20-
Move back to the beginning of that list of numbers
-
Do a normal selection of the lines ( from line
1to line20) -
Use the
Edit > Line Operations > Randomize Line Orderoption
=> You’ll get, for instance, this kind of OUTPUT :
9 5 20 18 19 3 7 6 17 8 16 2 14 1 4 15 10 12 11 13-
Move to the first number of this new list, at column
1 -
Hold down the
AltandShift -
Do a zero-width column selection of these
20numbers, with successive hits on theDownarrow -
Click two times on the
Rightarrow key, to select the complete numbers -
Click on the
Ctrl + Cshortcut -
Go to the beginning of your present list
-
Put the caret/cursor on the
15thcolumn of the first lineSmith -
Click on the
Ctrl + Vshortcut
=> You should get your expected OUTPUT text, below :
Surname Percentage Smith 9 1.26 Jones 5 0.75 Taylor 20 0.59 Brown 18 0.56 Williams 19 0.39 Wilson 3 0.39 Johnson 7 0.37 Davies 6 0.34 Robinson 17 0.32 Wright 8 0.32 Thompson 16 0.31 Evans 2 0.30 Walker 14 0.30 White 1 0.30 Roberts 4 0.28 Green 15 0.28 Hall 10 0.28 Wood 12 0.27 Jackson 11 0.27 Clark 13 0.26Best Regards,
guy038
Ciao, @stefano-brovelli e tutti,
Da wikipedia, ad esempio, ecco la lista dei
20cognomi più comuni in Inghilterra, che sarà il nostro testo INPUT :Cognome Percentuale Smith 1.26 Jones 0.75 Taylor 0.59 Brown 0.56 Williams 0.39 Wilson 0.39 Johnson 0.37 Davies 0.34 Robinson 0.32 Wright 0.32 Thompson 0.31 Evans 0.30 Walker 0.30 White 0.30 Roberts 0.28 Green 0.28 Hall 0.28 Wood 0.27 Jackson 0.27 Clark 0.26Supponiamo quindi di voler inserire una colonna di numeri casuali tra le colonne
CognomeePercentualeesistenti. Seguire questa tabella di marcia:-
Per prima cosa, determinare il numero di riga dell’elenco: nel nostro esempio abbiamo
20righe -
Dopo l’elenco, creare
20righe consecutive vuote. -
Tornare all’inizio di queste righe vuote.
-
Aprire il Column editor (
Alt + C)-
Selezionare l’opzione Numero da inserire.
-
Scegliere
1per ogni opzione e Zeri o Spazi per i **caratteri di testa -
Selezionare il formato
DEC -
Fare clic sul pulsante
OK
-
=> Naturalmente, si otterrà questo semplice elenco:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20-
Tornare all’inizio dell’elenco di numeri
-
Effettuare una selezione normale delle righe ( dalla riga
1alla riga20) -
Utilizzare l’opzione
Modifica > Operazioni di riga > Randomizza ordine righe.
=> Si otterrà, per esempio, questo tipo di OUTPUT :
9 5 20 18 19 3 7 6 17 8 16 2 14 1 4 15 10 12 11 13-
Passare al primo numero di questo nuovo elenco, alla colonna
1. -
Tenere premuti i tasti
AlteShift. -
Eseguire una selezione a larghezza zero di colonna di questi
20numeri, premendo successivamente la frecciaGiù. -
Fare clic due volte sul tasto freccia Destra per selezionare i numeri completi.
-
Fare clic sulla scorciatoia
Ctrl + C -
Andare all’inizio dell’elenco presente
-
Posizionare il cursore sulla 15° colonna della prima riga
Smith -
Cliccare sulla scorciatoia
Ctrl + V
=> Dovreste ottenere il testo aspettato OUTPUT, qui sotto:
Cognome Percentuale Smith 9 1.26 Jones 5 0.75 Taylor 20 0.59 Brown 18 0.56 Williams 19 0.39 Wilson 3 0.39 Johnson 7 0.37 Davies 6 0.34 Robinson 17 0.32 Wright 8 0.32 Thompson 16 0.31 Evans 2 0.30 Walker 14 0.30 White 1 0.30 Roberts 4 0.28 Green 15 0.28 Hall 10 0.28 Wood 12 0.27 Jackson 11 0.27 Clark 13 0.26Cordiali saluti,
guy038
Tradotto con DeepL.com (versione gratuita)
-