#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Rearranging numbers

That is O.K.

As I mentioned at the end of the post, put the real numbers in column B and
remove the line of code that pastes 1,2,3,4,... into column B.


Also change 100 into the real number of samples.

Good Luck!
--
Gary's Student


"ashw1984" wrote:

hi i need to rearrange a range of numbers but they arn't 1,2,3,4,5,6, etc its
like
0.01, 5,10,12,14,........
twenty-two different number's and i need to put them in a random order in
each column.
That was helpful thanks
but i'm not quite there yet.

"Gary''s Student" wrote:

Here is some demo code, it will run as is:


Sub ashw()
' gsnu
For i = 1 To 100
Cells(i, "A") = "=rand()"
Cells(i, "B") = i
Next

n = Application.InputBox("enter the number of additional columns (<254) ",
Type:=1)

For i = 1 To n
Columns("A:B").Sort Key1:=Range("A1")
For j = 1 To 100
Cells(j, i + 2) = Cells(j, "B")
Next
Next
End Sub

1. put the real data in column B
2. comment out Cells(i, "B") = i
3. change 100 to the number of items
--
Gary's Student


"ashw1984" wrote:

hi there could anybody help
Using visual basic i need to rearrange a column of numbers in a random order
and paste them into the next column. then repeated 'x' amount of time's.
along the spread sheet using an inputbox to ask for 'x'
thanks guys

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
Completely baffled on what should be simple Pat Hughes Excel Discussion (Misc queries) 12 October 23rd 06 08:24 PM
conditional formatting Lofty Excel Worksheet Functions 7 July 10th 06 09:06 PM
How to generate sets of random numbers without having duplicates William Excel Worksheet Functions 1 June 6th 06 05:30 AM
Why are 1/2 my numbers imported as text and the rest as numbers? KBear Excel Discussion (Misc queries) 2 April 21st 06 01:40 PM
Count comma separated numbers, numbers in a range with dash, not t Mahendra Excel Discussion (Misc queries) 0 August 8th 05 05:56 PM


All times are GMT +1. The time now is 08:28 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"