Advertisement
Guest User

Untitled

a guest
Feb 9th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. Sub example()
  2.  
  3. For i = 1 To 5
  4. Cells(i, 11) = 0
  5. Next i
  6.  
  7.  
  8. For i = 1 To 10
  9. Cells(1, 11) = Cells(1, 11) + Cells(1, i)
  10. Next i
  11.  
  12. Cells(1, 11) = Cells(1, 11) / 10
  13.  
  14. For i = 1 To 10
  15. Cells(2, i) = Cells(1, i) - Cells(1, 11)
  16.  
  17. Cells(3, i) = Cells(2, i) ^ 2
  18. Cells(4, i) = Cells(2, i) ^ 3
  19. Cells(5, i) = Cells(2, i) ^ 4
  20.  
  21. Cells(2, 11) = Cells(2, 11) + Cells(2, i)
  22. Cells(3, 11) = Cells(3, 11) + Cells(3, i)
  23. Cells(4, 11) = Cells(4, 11) + Cells(4, i)
  24. Cells(5, 11) = Cells(5, 11) + Cells(5, i)
  25. Next i
  26.  
  27. Cells(2, 11) = Cells(2, 11) / 10
  28. Cells(3, 11) = Cells(3, 11) / 10
  29. Cells(4, 11) = Cells(4, 11) / 10
  30. Cells(5, 11) = Cells(5, 11) / 10
  31.  
  32. End Sub
  33.  
  34. Sub IceCream()
  35. For i = 1 To 10
  36. Cells(i, 1) = 2 * i
  37. Next i
  38.  
  39. For i = 1 To 10
  40. Cells(i, 2) = 2 * i - 1
  41. Next i
  42.  
  43. For i = 1 To 10
  44. Cells(i, 3) = Cells(i, 1) + Cells(i, 2)
  45. Next i
  46. End Sub
  47.  
  48. Sub Faint()
  49. s = 0
  50. For i = 1 To 10
  51. s = s + 1
  52. For j = 1 To 3
  53.  
  54. Cells(1, j) = s
  55. Next
  56. Next
  57. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement