PDA

View Full Version : [SOLVED] Sheet continuation



RobertBC
03-09-2005, 01:46 AM
hello,

i had 300,000 generated numbers and i want those numbers to display each row on excel worksheet. the problem is, excel has only 65536 rows available for each worksheet.
how can i display the remaining generated numbers into another worksheet or maybe add worksheet for the continuation of my results.

thanks :friends:

Jacob Hilderbrand
03-09-2005, 05:32 AM
How are you getting the generated numbers into Excel? Is Excel generating them or are you trying to import them?

patrickab
03-09-2005, 01:06 PM
If you want to generate 300,000 random integers for example between 0 and 100 you can use


=INT(RAND()*101)

Copy down the column to row 60000 and copy the whole column and paste it into 4 more columns in the same worksheet or different worksheets. If required convert them to values using Copy/Edit/PasteSpecial/Values.

RobertBC
03-09-2005, 11:28 PM
DRJ, patrickab,

thanks for your time. i had vba that generate 5 combination of numbers 1 30. those generated number will display each row every combination. something like lotto generated number. my problem is how can i add or even goto next sheet as my result reach 65536 rows. :bow: :bow:

Jacob Hilderbrand
03-10-2005, 12:18 AM
I suppose you have a loop that goes from 1 to 300,000. You could add something like this.



Dim Counter As Long
Dim ws As Worksheet
Counter = 1
Set ws = Sheets.Add
'Loop Starts Here
For i = 1 to 300000
ws.Range("A" & Counter).Value = Random Number Code Here
If Counter = 65536 Then
Set ws = Sheets.Add
Counter = 1
Else
Counter = Counter + 1
End If
Next i


If you need more specific help, post the current code that you are using.

RobertBC
03-10-2005, 03:02 AM
thanks DRJ you're a big help.

Jacob Hilderbrand
03-10-2005, 07:37 AM
You're Welcome :beerchug:

Take Care