TheWennerWoman
Active Member
- Joined
- Aug 1, 2019
- Messages
- 303
- Office Version
- 365
- Platform
- Windows
Apologies, I'm still not confident enough with arrays to try this.
I've written a script in Python to generate 40,000 dice rolls and I have copied and pasted these in cells Z2:Z40001.
What I'd like to do is put Z2 into B2, Z3 into C2, Z4 into B3, Z5 into C3 and so on (effectively splitting the 40,000 individual dice rolls into 20000 pairs of dice rolls.
I've tried this but after 3 hours it was still running
Can I put the 40000 numbers into an array and split them that way? Or is 40000 too many elements for an array?
Thank you for reading and Merry Christmas to all.
I've written a script in Python to generate 40,000 dice rolls and I have copied and pasted these in cells Z2:Z40001.
What I'd like to do is put Z2 into B2, Z3 into C2, Z4 into B3, Z5 into C3 and so on (effectively splitting the 40,000 individual dice rolls into 20000 pairs of dice rolls.
I've tried this but after 3 hours it was still running
Code:
Sub test()
a = 2
b = 2
c = 3
d = 2
Do While a < 40001
Range("B" & b).Value = Range("Z" & d).Value
Range("C" & b).Value = Range("Z" & c).Value
b = b + 1
c = c + 2
d = d + 2
a = a + 1
Loop
End Sub
Can I put the 40000 numbers into an array and split them that way? Or is 40000 too many elements for an array?
Thank you for reading and Merry Christmas to all.