Shuffle data - Column with letter A will list a random data from column letter B

curb

New Member
Joined
Sep 30, 2008
Messages
6
I'm trying to figure out a formula to shuffle data based on the what column category they're in.

Any Column with a letter "A" will be "partnered up" with any of the names the are under any Column with a letter "B".

The letter excel looks like this:

LETTER A B C A B C A B C A B C
NAME NAME1 NAME2 NAME3 NAME4 NAME5 NAME6 NAME7 NAME8 NAME9 NAME10 NAME11 NAME12
When it shuffles, it'll look like this:

LETTER A B C A B C A B C A B C
NAME NAME1 NAME2 NAME3 NAME4 NAME5 NAME6 NAME7 NAME8 NAME9 NAME10 NAME11 NAME12
Shuffled Grouping NAME5 NAME9 NAME4 NAME2 NAME6 NAME1 NAME11 NAME3 NAME10 NAME8 NAME12 NAME7
Here's the data example delimited by commas
PHP:
LETTER,A,B,C,A,B,C,A,B,C,A,B,C
NAME,NAME1,NAME2,NAME3,NAME4,NAME5,NAME6,NAME7,NAME8,NAME9,NAME10,NAME11,NAME12
Random Grouping,NAME5,NAME9,NAME4,NAME2,NAME6,NAME1,NAME11,NAME3,NAME10,NAME8,NAME12,NAME7
Random Grouping,NAME8,NAME6,NAME4,NAME2,NAME9,NAME7,NAME11,NAME12,NAME10,NAME5,NAME3,NAME11
,,,,,,,,,,,,
,,,,,,,,,,,,
,,,,,,,,,,,,
,,,,,,,,,,,,
,,,,,,,,,,,,
,,,,,,,,,,,,
,,,,,,,,,,,,
,,,,,,,,,,,,
"Any Column with a letter ""A"" will be partnerd up with any of the names the are under any Column with a letter ""B""",,,,,,,,,,,,
"Once the column finds a partner, that partner can't be used again",,,,,,,,,,,,
"If NAME1 is partnered up with NAME8, NAME8 cannot be used again when NAME4, NAME7, NAME10 is looking for a ""B"" partner",,,,,,,,,,,,
"NAME1 can be partnered up with NAME2, NAME5, NAME8 OR NAME 11",,,,,,,,,,,,
"NAME2 can be partnered up with NAME3, NAME6, NAME9, NAME12",,,,,,,,,,,,
"NAME3 can be partnered up with NAME1, NAME4, NAME7, NAME10",,,,,,,,,,,,
,,,,,,,,,,,,
"Column letter A will look for ""B""",,,,,,,,,,,,
"Column letter B will look for ""C""",,,,,,,,,,,,
"Column letter C will look for ""A""",,,,,,,,,,,,
Any sort direction would be great.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Thanks Vog for the suggestion.

I tested out the shuffle and it only works selecting one column going down and not across by row. The shuffle has a certain rule where only a selected data can be randomly shuffled in a specific column.
 
Upvote 0

Forum statistics

Threads
1,214,907
Messages
6,122,185
Members
449,071
Latest member
cdnMech

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