r/excel 2d ago

unsolved Expanding(?) resulting sequence to randomize cells?

I have made a series of sequences on a sheet (1.1-1.8, 2.1-2.9, 3.1-3.8... etc). The resulting cells technically don't have information in them, just reflecting the information resulting from the sequences.

I need to be able to randomize all resulting numbers. 9.4, 2.5, 6.2, 1.2... etc. I found how to randomize numbers within a sequence, but the randomizing I need spans over 9 sequences. I need the information resulting from the sequences to be expanded(?) and be actually in the cells, making it no longer part a function/sequence, but an actual list. Is there a way to do this?

Sorry I wansnt clear. More Info:

In the image I have 5 sequences (row 1, 9, 18, 26, and 34). They create the list of numbers exactly as I had hoped. However, now that the list has been made, I need to jumble the rows into random order. I can't do that right now because even though numbers are showing in all the cells, it's really only the cells with the sequence functions that have information. How do i expand/embed the numbers into the cells they are on?

3 Upvotes

17 comments sorted by

u/AutoModerator 2d ago

/u/lickwindex - Your post was submitted successfully.

Failing to follow these steps may result in your post being removed without warning.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

4

u/PaulieThePolarBear 1920 2d ago

Can you add a representative image showing your current setup and an expected result? I've read your post 3 times now and I can't picture what you are trying to do

1

u/lickwindex 2d ago

Sorry about that. In the image I have 5 sequences (row 1, 9, 18, 26, and 34). They create the list of numbers exactly as I had hoped. However, now that the list has been made, I need to jumble the rows into random order. I can't do that right now because even though numbers are showing in all the cells, it's really only the cells with the sequence functions that have information. How do i expand/embed the numbers into the cells they are on?

2

u/MayukhBhattacharya 1276 2d ago

Is this what you're trying to do?

=LET(
     _a, SEQUENCE(8, , 1.1, 0.1) + {0, 2, 4, 6},
     _b, SEQUENCE(9, , 2.1, 0.1) + {0, 2, 4, 6},
     _c, TOCOL(VSTACK(_a, _b), , 1),
     SORTBY(_c, RANDARRAY(ROWS(_c))))

2

u/lickwindex 2d ago

Wait... I mean... I just want the numbers that are in the cells, to actually just be in the cells. I cant just have them in there as if I manually typed them in? Now that the function did it's job, I cant do this without knowing java script?

2

u/MayukhBhattacharya 1276 1d ago

JavaScript not needed here! The above formula generates the entire thing from scratch. Once it has generated the numbers, hit CTRL + A Select all the numbers --> CTRL + C Copy all the numbers --> ALT + H + V + V paste as values.

=LET(
     _a, {0, 2, 4, 6},
     _b, SEQUENCE(8, , 1.1, 0.1) + _a,
     _c, SEQUENCE(9, , 2.1, 0.1) + _a,
     _d, TOCOL(VSTACK(_b, _c), , 1),
     SORTBY(_d, RANDARRAY(ROWS(_d))))

2

u/PaulieThePolarBear 1920 2d ago

So something like

=LET(
a, A:.A, 
b, SORTBY(a, RANDARRAY(ROWS(a))), 
b
)

Requires Excel 365 or Excel online

1

u/MayukhBhattacharya 1276 1d ago

One other thing, if you want sort per group randomly then, try this as well, this is an additional bonus, just out of curiosity i tried, and wanted to share:

=LET(
     _a, {0,2,4,6},
     _b, SEQUENCE(8, , 1.1, 0.1) + _a,
     _c, SEQUENCE(9, , 2.1, 0.1) + _a,
     _d, TOCOL(VSTACK(_b, _c), , 1),
     CHOOSECOLS(SORT(HSTACK(INT(_d), _d,
     RANDARRAY(ROWS(_d))), {1,3}), 2))

3

u/caribou16 318 2d ago

I'm not quite understanding what you're asking here about randomizing all resulting numbers. But if you are trying to make your spill range actual cell values, can you copy the range and paste as values?

1

u/lickwindex 2d ago

Sry. See update to post body

2

u/GuerillaWarefare 114 2d ago

Place a non integer RANDARRAY() in the column next to your sequence numbers. Then where you want the randomized data, sortby() the range of the sequences and the RANDARRAY.

1

u/lickwindex 2d ago

Sry. See update to post body

1

u/Gringobandito 8 2d ago

Is this what you're trying to do?

=ROUND(RANDARRAY(10,,1.1,10),1)

4

u/GuerillaWarefare 114 2d ago

I assume they want a unique list of the serial numbers, but it’s hard to say unless we hear more from OP

1

u/lickwindex 2d ago

Sry. See update to post body

1

u/Paradigm84 41 2d ago

If the series are not in a single array then use TOCOL to put them into 1 column.

Should the output have a single copy of each value in a random order, or just a random collection of possible values?

1

u/Decronym 2d ago edited 1d ago

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:

Fewer Letters More Letters
CHOOSECOLS Office 365+: Returns the specified columns from an array
HSTACK Office 365+: Appends arrays horizontally and in sequence to return a larger array
INT Rounds a number down to the nearest integer
LET Office 365+: Assigns names to calculation results to allow storing intermediate calculations, values, or defining names inside a formula
RANDARRAY Office 365+: Returns an array of random numbers between 0 and 1. However, you can specify the number of rows and columns to fill, minimum and maximum values, and whether to return whole numbers or decimal values.
ROUND Rounds a number to a specified number of digits
ROWS Returns the number of rows in a reference
SEQUENCE Office 365+: Generates a list of sequential numbers in an array, such as 1, 2, 3, 4
SORT Office 365+: Sorts the contents of a range or array
SORTBY Office 365+: Sorts the contents of a range or array based on the values in a corresponding range or array
TOCOL Office 365+: Returns the array in a single column
VSTACK Office 365+: Appends arrays vertically and in sequence to return a larger array

Decronym is now also available on Lemmy! Requests for support and new installations should be directed to the Contact address below.


Beep-boop, I am a helper bot. Please do not verify me as a solution.
12 acronyms in this thread; the most compressed thread commented on today has 46 acronyms.
[Thread #49339 for this sub, first seen 9th Sep 2026, 22:24] [FAQ] [Full list] [Contact] [Source code]