Trai60

ProlificCSVMacro4.bas

May 17th, 2024
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.54 KB | Software | 0 0
  1. Attribute VB_Name = "Prolific04"
  2. Sub Results02()
  3. Attribute Results02.VB_ProcData.VB_Invoke_Func = " \n14"
  4. '
  5. ' Results02 Macro
  6. '
  7.  
  8. '
  9. Range("A1").Select
  10. ActiveCell.FormulaR1C1 = "Results"
  11. Range("A3").Select
  12. ActiveCell.FormulaR1C1 = "Approved"
  13. Range("A4").Select
  14. ActiveCell.FormulaR1C1 = "Returned"
  15. Range("A5").Select
  16. ActiveCell.FormulaR1C1 = "Awaiting Review"
  17. Range("A6").Select
  18. ActiveCell.FormulaR1C1 = "Rejected"
  19. Range("A8").Select
  20. ActiveCell.FormulaR1C1 = "Approval Rating"
  21. Range("A10").Select
  22. ActiveCell.FormulaR1C1 = "Time Worked"
  23. Range("A12").Select
  24. ActiveCell.FormulaR1C1 = "Reward £"
  25. Range("A13").Select
  26. ActiveCell.FormulaR1C1 = "Bonus £"
  27. Range("A14").Select
  28. ActiveCell.FormulaR1C1 = "Reward $"
  29. Range("A15").Select
  30. ActiveCell.FormulaR1C1 = "Bonus $"
  31. Range("A17").Select
  32. ActiveCell.FormulaR1C1 = "Total $"
  33. Range("A18").Select
  34. ActiveCell.FormulaR1C1 = "Total £ Converted to $"
  35. Range("A20").Select
  36. ActiveCell.FormulaR1C1 = "Total Earned"
  37. Range("A22").Select
  38. ActiveCell.FormulaR1C1 = "P/H Rate"
  39. Range("B3").Select
  40. ActiveCell.FormulaR1C1 = _
  41. "=COUNTIF(my_prolific_submission_history!C[8], ""APPROVED"")"
  42. Range("B4").Select
  43. ActiveCell.FormulaR1C1 = _
  44. "=COUNTIF(my_prolific_submission_history!C[8], ""RETURNED"")"
  45. Range("B5").Select
  46. ActiveCell.FormulaR1C1 = _
  47. "=COUNTIF(my_prolific_submission_history!C[8], ""AWAITING REVIEW"")"
  48. Range("B6").Select
  49. ActiveCell.FormulaR1C1 = _
  50. "=COUNTIF(my_prolific_submission_history!C[8], ""REJECTED"")"
  51. Range("B8").Select
  52. ActiveCell.FormulaR1C1 = "=TEXT(R[-5]C / (R[-5]C + R[-2]C), ""0.00%"")"
  53. Range("B8").Select
  54. With Selection
  55. .HorizontalAlignment = xlRight
  56. .VerticalAlignment = xlBottom
  57. .WrapText = False
  58. .Orientation = 0
  59. .AddIndent = False
  60. .IndentLevel = 0
  61. .ShrinkToFit = False
  62. .ReadingOrder = xlContext
  63. .MergeCells = False
  64. End With
  65. Range("B10").Select
  66. ActiveCell.FormulaR1C1 = "=SUM(my_prolific_submission_history[Time Taken])"
  67. Range("B12").Select
  68. ActiveCell.FormulaR1C1 = _
  69. "=ROUND(SUMIFS(my_prolific_submission_history!C, my_prolific_submission_history!C[8], ""<>RETURNED"", my_prolific_submission_history!C[8], ""<>REJECTED"", my_prolific_submission_history!C[8], ""<>AWAITING REVIEW""), 2)"
  70. Range("B13").Select
  71. ActiveCell.FormulaR1C1 = "=SUM(my_prolific_submission_history[Bonus £])"
  72. Range("B14").Select
  73. ActiveCell.FormulaR1C1 = _
  74. "=ROUND(SUMIFS(my_prolific_submission_history!C[2], my_prolific_submission_history!C[8], ""<>RETURNED"", my_prolific_submission_history!C[8], ""<>REJECTED"", my_prolific_submission_history!C[8], ""<>AWAITING REVIEW""), 2)"
  75. Range("B15").Select
  76. ActiveCell.FormulaR1C1 = "=SUM(my_prolific_submission_history[Bonus $])"
  77. Range("B17").Select
  78. ActiveCell.FormulaR1C1 = "=SUM(R[-3]C,R[-2]C)"
  79. Range("B18").Select
  80. ActiveCell.FormulaR1C1 = "=SUM(R[-6]C+R[-5]C)*1.2677446"
  81. Range("B20").Select
  82. ActiveCell.FormulaR1C1 = "=SUM(R[-3]C,R[-2]C)"
  83. Range("B22").Select
  84. ActiveCell.FormulaR1C1 = "=R[-2]C / (R[-12]C * 24)"
  85. Range("B10").Select
  86. Selection.NumberFormat = "[h]:mm:ss"
  87. Range("B13").Select
  88. Selection.NumberFormat = _
  89. "_-[$£-en-GB]* #,##0.00_-;-[$£-en-GB]* #,##0.00_-;_-[$£-en-GB]* ""-""??_-;_-@_-"
  90. Range("B15").Select
  91. Selection.NumberFormat = _
  92. "_-[$$-en-US]* #,##0.00_ ;_-[$$-en-US]* -#,##0.00 ;_-[$$-en-US]* ""-""??_ ;_-@_ "
  93. Range("B17").Select
  94. Selection.NumberFormat = _
  95. "_-[$$-en-US]* #,##0.00_ ;_-[$$-en-US]* -#,##0.00 ;_-[$$-en-US]* ""-""??_ ;_-@_ "
  96. Range("B18").Select
  97. Selection.NumberFormat = _
  98. "_-[$$-en-US]* #,##0.00_ ;_-[$$-en-US]* -#,##0.00 ;_-[$$-en-US]* ""-""??_ ;_-@_ "
  99. Range("B14").Select
  100. Selection.NumberFormat = _
  101. "_-[$$-en-US]* #,##0.00_ ;_-[$$-en-US]* -#,##0.00 ;_-[$$-en-US]* ""-""??_ ;_-@_ "
  102. Range("B12").Select
  103. Selection.NumberFormat = _
  104. "_-[$£-en-GB]* #,##0.00_-;-[$£-en-GB]* #,##0.00_-;_-[$£-en-GB]* ""-""??_-;_-@_-"
  105. Range("B20").Select
  106. Selection.NumberFormat = _
  107. "_-[$$-en-US]* #,##0.00_ ;_-[$$-en-US]* -#,##0.00 ;_-[$$-en-US]* ""-""??_ ;_-@_ "
  108. Range("B22").Select
  109. Selection.NumberFormat = _
  110. "_-[$$-en-US]* #,##0.00_ ;_-[$$-en-US]* -#,##0.00 ;_-[$$-en-US]* ""-""??_ ;_-@_ "
  111. Cells.Select
  112. Selection.Columns.AutoFit
  113. Range("B23").Select
  114. End Sub
  115.  
Advertisement
Add Comment
Please, Sign In to add comment