Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need help w/program to randomly sort row data
I've got an Excel worksheet with several columns of data. I want to randomly
shuffle all of the row data and then overwrite column A with sequential numbers down the column, 1...X, where X is the last row. Any ideas? Example: 1 B C D 2 G K L 3 D K C might become 2 G K L 1 B C D 3 D K C and then with column A renumbered, look like: 1 G K L 2 B C D 3 D K C I don't know much about Excel at all. How can I develop such a thing. Furthermore, can this also be done via a command line? Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need help w/program to randomly sort row data
With your first block of data on rows 1-3 (without a header)
replace the values 1 2 3 (A1,A2 and A3) with =Row() in A1 and copy down When you sort sort on Column B -- then Column A will automatically change to 1,2 3 (ascending order). HTH "please respondhere" wrote in message m... I've got an Excel worksheet with several columns of data. I want to randomly shuffle all of the row data and then overwrite column A with sequential numbers down the column, 1...X, where X is the last row. Any ideas? Example: 1 B C D 2 G K L 3 D K C might become 2 G K L 1 B C D 3 D K C and then with column A renumbered, look like: 1 G K L 2 B C D 3 D K C I don't know much about Excel at all. How can I develop such a thing. Furthermore, can this also be done via a command line? Thanks. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need help w/program to randomly sort row data
Before doing a sort (in excel) as long as you have our active cell
"somewhere" within your given "data-table", that is within a block of data (the top left corner and the bottom right corner) Excel automatically "Knows" you have a listing and will automatically assign the area as the area to be "grabbed" and included in the sort. ALL columns (Highlighted) will be included in the sort and Everything on a given row will stay "intact", that is not be rearranged << the basic premise of sorting; so with your cursor within your data (somewhere) click on the menu Data, Sort, Click say 1) column b Everything should be fine. << and your column 1 should rearrange itself to 1,2,3 since it is reading the imbedded row-header number. HTH "please respondhere" wrote in message ... Thanks for the feedback. I agree with your response about column A. I do need to preserve row data, however: (B C D; G K L; D K C) so I can't sort by column for column B, C, & D. The order of the row data which I have listed using 3 capital letters must be preserved on a given row but the actual row number ( say 1 through X) is to be random. The data in column A must also be listed sequentially, so I can't have A1 = 5, for example. It must always be 1, A2 = 2, and so on. In article <PWeSc.18599$Bb.9964@lakeread08, says... With your first block of data on rows 1-3 (without a header) replace the values 1 2 3 (A1,A2 and A3) with =Row() in A1 and copy down When you sort sort on Column B -- then Column A will automatically change to 1,2 3 (ascending order). HTH "please respondhere" wrote in message om... I've got an Excel worksheet with several columns of data. I want to randomly shuffle all of the row data and then overwrite column A with sequential numbers down the column, 1...X, where X is the last row. Any ideas? Example: 1 B C D 2 G K L 3 D K C might become 2 G K L 1 B C D 3 D K C and then with column A renumbered, look like: 1 G K L 2 B C D 3 D K C I don't know much about Excel at all. How can I develop such a thing. Furthermore, can this also be done via a command line? Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I randomly sort a column of data using Excel? | Excel Discussion (Misc queries) | |||
How do i sort rows randomly? | Excel Discussion (Misc queries) | |||
How do I randomly sort data in a column? | Excel Discussion (Misc queries) | |||
How do you randomly sort a RANGE | Excel Worksheet Functions | |||
I want to sort data randomly in addition to the current descendin. | Excel Worksheet Functions |