Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have drawn up a table 10 columns by 30 rows and have a inserted a random
number between 1000 - 3000 in each cell using the RANDBETWEEN function. Is there a way I can sort the table so that the lowest value appears in the top left cell and the highest in the bottom right (ie. in order by rows and then by columns)? I hope this makes sense. Alternatively how can I ensure that I do not have any duplicate numbers in my selection? Your assistance is appreciated. Thank you |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
T,
My Excel add-in Special Sort can sort the data in a table - either across the rows or down the columns and in ascending or descending order. It has over 20 different sort methods not readily available in Excel. They include sorting by numbers only, color prefix, middle, suffix, random, reverse, no articles, dates, decimal (ip and dewey), length and others. Looks and works somewhat like the regular Excel sort utility. It comes with a Word.doc install/use file. It is - free - just email me and ask for it. (release 1.51) Remove XXX from my email address. '----- Also, I have Excel VBA code that will enter non-duplicated random numbers in a table arrangement. I can post that if you are interested. Jim Cone San Francisco, USA XX "Twinkle17" wrote in message ... I have drawn up a table 10 columns by 30 rows and have a inserted a random number between 1000 - 3000 in each cell using the RANDBETWEEN function. Is there a way I can sort the table so that the lowest value appears in the top left cell and the highest in the bottom right (ie. in order by rows and then by columns)? I hope this makes sense. Alternatively how can I ensure that I do not have any duplicate numbers in my selection? Your assistance is appreciated. Thank you |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I had a private message requesting the random number VBA code...
'Fills first R rows by C columns with random numbers 'from 1 to (R * C) - without any duplicates. 'Jim Cone - August 20, 2004 - San Francisco, USA '-------------------------------- Sub MixThemUp() Dim i As Long Dim j As Long Dim N As Long 'Specify number of rows and columns. Const R As Long = 30 Const C As Long = 10 Const lngFiller As Long = 9999 Dim ArrOne(1 To C) Dim ArrTwo(1 To (R * C)) '30 loops for 30 rows For N = 1 To R j = 1 '10 loops for ten columns Do While j < (C + 1) Randomize (j * N) 'Int((upperbound - lowerbound + 1) * Rnd + lowerbound) i = Int(Rnd * (R * C) + 1) If ArrTwo(i) < lngFiller Then ArrOne(j) = i ArrTwo(i) = lngFiller j = j + 1 End If Loop 'Fill each row with the array values Range(Cells(N, 1), Cells(N, 10)).Value = ArrOne() Next 'N End Sub '--------------------------------------------------------- "Jim Cone" wrote in message T, My Excel add-in Special Sort can sort the data in a table - either across the rows or down the columns and in ascending or descending order. It has over 20 different sort methods not readily available in Excel. They include sorting by numbers only, color prefix, middle, suffix, random, reverse, no articles, dates, decimal (ip and dewey), length and others. Looks and works somewhat like the regular Excel sort utility. It comes with a Word.doc install/use file. It is - free - just email me and ask for it. (release 1.51) Remove XXX from my email address. '----- Also, I have Excel VBA code that will enter non-duplicated random numbers in a table arrangement. I can post that if you are interested. Jim Cone San Francisco, USA XX "Twinkle17" wrote in message ... I have drawn up a table 10 columns by 30 rows and have a inserted a random number between 1000 - 3000 in each cell using the RANDBETWEEN function. Is there a way I can sort the table so that the lowest value appears in the top left cell and the highest in the bottom right (ie. in order by rows and then by columns)? I hope this makes sense. Alternatively how can I ensure that I do not have any duplicate numbers in my selection? Your assistance is appreciated. Thank you |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I sort in groups of 3 rows? | Excel Worksheet Functions | |||
need help righting script to sort rows alphabetically then seperate them to line up | Excel Worksheet Functions | |||
pivot table error (25000 rows!!) | Excel Discussion (Misc queries) | |||
Transpose rows to columns w/varying numbers of lines per record | Excel Worksheet Functions | |||
Sort multiple rows by data in certain columns | Excel Discussion (Misc queries) |