Formula to rearrange names in random order

FryGirl

Well-known Member
Joined
Nov 11, 2008
Messages
1,372
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Using the names in row 1, randomly display the same names in row 2 with a formula starting in A2 without duplicating the same name in the same column. Something like the below.

Data Range
[TABLE="class: grid"]
<tbody>[TR]
[TD][/TD]
[TD]
A​
[/TD]
[TD]
B​
[/TD]
[TD]
C​
[/TD]
[TD]
D​
[/TD]
[TD]
E​
[/TD]
[/TR]
[TR]
[TD]
1​
[/TD]
[TD]
Jack​
[/TD]
[TD]
Cheryl​
[/TD]
[TD]
Bob​
[/TD]
[TD]
Jim​
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
2​
[/TD]
[TD]
Bob​
[/TD]
[TD]
Jack​
[/TD]
[TD]
Jim​
[/TD]
[TD]
Cheryl​
[/TD]
[TD]
Formula for a random Order​
[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Maybe this

Regular formula in A2
=INDEX(A1:D1,RANDBETWEEN(1,4))

Array formula in B2 copied across until D2
=INDEX($A$1:$D$1,SMALL(IF(ISNA(MATCH($A$1:$D$1,$A2:A2,0)),COLUMN($A$1:$D$1)-COLUMN($A$1)+1),RANDBETWEEN(1,4-COUNTA($A2:A2))))
Ctrl+Shift+Enter

M.
 
Upvote 0
Ciao Marcelo,

Works great. Thank you for your time.
 
Upvote 0

Forum statistics

Threads
1,226,113
Messages
6,189,048
Members
453,522
Latest member
Seeker2025

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top