Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default 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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Need help w/program to randomly sort row data

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.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I randomly sort a column of data using Excel? Paul F. Excel Discussion (Misc queries) 2 July 9th 08 12:57 AM
How do i sort rows randomly? Jeremy Excel Discussion (Misc queries) 5 December 12th 07 01:03 PM
How do I randomly sort data in a column? goody Excel Discussion (Misc queries) 1 October 2nd 06 03:36 PM
How do you randomly sort a RANGE latturne Excel Worksheet Functions 4 September 29th 05 09:40 PM
I want to sort data randomly in addition to the current descendin. ckephart Excel Worksheet Functions 2 November 12th 04 06:11 PM


All times are GMT +1. The time now is 11:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"