How to randomize text string data
How to randomize text string data
(OP)
Hi
Dear all
Anyone knows how to randomize the text data in string cell say I have a data like this
A B C D
1 XA NA PU MN
2 AX LN TI ND
3 EF PN UV OX
4 JX KN JY SL
.
.
1200 HN SY BY WX
I want to ranomize this data in both rowwise and columnwise.
If there any simple trick, this will be great for me
Thanks
Dear all
Anyone knows how to randomize the text data in string cell say I have a data like this
A B C D
1 XA NA PU MN
2 AX LN TI ND
3 EF PN UV OX
4 JX KN JY SL
.
.
1200 HN SY BY WX
I want to ranomize this data in both rowwise and columnwise.
If there any simple trick, this will be great for me
Thanks





RE: How to randomize text string data
It would be harder do randomize the list while ensuring that each value is used once and only once. This would almost certainly require VBA.
RE: How to randomize text string data
Hg
Eng-Tips policies: FAQ731-376: Eng-Tips.com Forum Policies
RE: How to randomize text string data
(1) Copy your 1200x4 items into a 4800x1 column somewhere else on your worksheet.
(2) Immediately to the right of this new column put a 4800x1 column of =RAND() entries.
(3) Hit the calc key (F9) to regenerate a new set of random numbers.
(4) Sort this 4800x2 range based on the column of random numbers.
(5) Copy the newly sorted 4800x1 column back over the top of your original 1200x4 range.
That approach would work fine if you only want to do this once. If you need to do it multiple times, you could make some refinements to the approach. Among other things, you would have to modify step 5 to create a new 1200x4 range for the randomised version, leaving the original table unchanged. Then create a keystroke-recorded macro to cover the recalc and sort operations.
If you want to go one step further and introduce flexibility in terms of how long your data table is (ie strating with a table 1300x4 or 2199x4 or ...) it becomes more complicated again, but I think it could probably be achieved within a reasonably simple macro.
RE: How to randomize text string data
CODE
RE: How to randomize text string data
Actually the word is not of two letters, It depends on letter so cannto say how many letters. If so what happens. Could you suggest me.
Thanks
RE: How to randomize text string data
http:
-handleman, CSWP (The new, easy test)
RE: How to randomize text string data
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
RE: How to randomize text string data
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
RE: How to randomize text string data
http:/
Just select a range of interest, push the button (or select the macro randomize), and the entries of those cells are shuffled.
This was copied in part from "Excel For Scientists and Engineers" by Joseph Billo
The sort routine (sort based on random number of course) is very primitive and will likely bog down for very large lists. If that becomes a problem, let me know. I can change it to do the sorting in another spreadhsett using excels sort functio which is much faster.
=====================================
Eng-tips forums: The best place on the web for engineering discussions.
RE: How to randomize text string data
It deoes not use any sorting, so I'm sure it would be much faster. I haven't studied the logic well enough to understand whether it will truly shuffle, while avoiding omissions and repeats.
http://www.cpearson.com/excel/MainPage.aspx
http://www.cpearson.com/excel/ShuffleArray.aspx
=====================================
Eng-tips forums: The best place on the web for engineering discussions.
RE: How to randomize text string data
You loop through the array once, attempting to swap each element in passing with another random element.
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
RE: How to randomize text string data
=====================================
Eng-tips forums: The best place on the web for engineering discussions.