Guest User

elect code

a guest
Sep 20th, 2018
138
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub elect()
  2.  
  3. Dim i As Integer
  4. Dim j As Long
  5.  
  6. Application.ScreenUpdating = False
  7.  
  8. For i = 1 To 3000
  9. Application.StatusBar = i
  10. Cells(i + 4, 1) = i
  11. For j = 1 To 1108171
  12. Randomize
  13. r = Int(Rnd * 4) + 1
  14. Cells(i + 4, 1 + r) = Cells(i + 4, 1 + r) + 1
  15. Next j
  16. Next i
  17.  
  18. Application.StatusBar = False
  19. Application.ScreenUpdating = True
  20.  
  21. End Sub
RAW Paste Data