Advertisement
Guest User

Untitled

a guest
Aug 21st, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.34 KB | None | 0 0
  1. Dim grosswt As Double
  2.  
  3. 'lbs<130
  4.  
  5. If check.Value <= 130 And ref.Value = "Bio" Then
  6. grosswt = (use.Value + 20) * (102 / 100)
  7.  
  8. ElseIf check.Value <= 130 And ref.Value = "Presetting" Then
  9. grosswt = (use.Value + 20) * (101 / 100)
  10.  
  11. ElseIf check.Value <= 130 And ref.Value = "Sueded" Then
  12. grosswt = (use.Value + 20) * (101 / 100)
  13.  
  14. ElseIf check.Value <= 130 And ref.Value = "Brushing" Then
  15. grosswt = (use.Value + 20) * (115 / 100)
  16.  
  17. ElseIf check.Value <= 130 And ref.Value = "Printing" Then
  18. grosswt = (use.Value + 20) * (101 / 100)
  19.  
  20. 'lbs between 131 and 200
  21.  
  22. ElseIf check.Value >= 131 And check.Value <= 200 And ref.Value = "Bio" Then
  23. grosswt = ((use.Value * 1.15) + 15) * (102 / 100)
  24.  
  25. ElseIf check.Value >= 131 And check.Value <= 200 And ref.Value = "Presetting" Then
  26. grosswt = ((use.Value * 1.15) + 15) * (101 / 100)
  27.  
  28. ElseIf check.Value >= 131 And check.Value <= 200 And ref.Value = "Sueded" Then
  29. grosswt = ((use.Value * 1.15) + 15) * (101 / 100)
  30.  
  31. ElseIf check.Value >= 131 And check.Value <= 200 And ref.Value = "Brushing" Then
  32. grosswt = ((use.Value * 1.15) + 15) * (115 / 100)
  33.  
  34. ElseIf check.Value >= 131 And check.Value <= 200 And ref.Value = "Printing" Then
  35. grosswt = ((use.Value * 1.15) + 15) * (101 / 100)
  36.  
  37. 'lbs between 201 and 500
  38.  
  39. ElseIf check.Value >= 201 And check.Value <= 500 And ref.Value = "Bio" Then
  40. grosswt = ((use.Value * 1.1) + 10) * (102 / 100)
  41.  
  42. ElseIf check.Value >= 201 And check.Value <= 500 And ref.Value = "Presetting" Then
  43. grosswt = ((use.Value * 1.1) + 10) * (101 / 100)
  44.  
  45. ElseIf check.Value >= 201 And check.Value <= 500 And ref.Value = "Sueded" Then
  46. grosswt = ((use.Value * 1.1) + 10) * (101 / 100)
  47.  
  48. ElseIf check.Value >= 201 And check.Value <= 500 And ref.Value = "Brushing" Then
  49. grosswt = ((use.Value * 1.1) + 10) * (115 / 100)
  50.  
  51. ElseIf check.Value >= 201 And check.Value <= 500 And ref.Value = "Printing" Then
  52. grosswt = ((use.Value * 1.1) + 10) * (101 / 100)
  53.  
  54.  
  55. '60%c40%p lbs between 501 and 999
  56.  
  57. ElseIf check.Value >= 501 And check.Value <= 999 And ctn = "60%Cotton40%Poly" And ref.Value = "Bio" Then
  58. grosswt = (use.Value * 1.11) * (102 / 100)
  59.  
  60. ElseIf check.Value >= 501 And check.Value <= 999 And ctn = "60%Cotton40%Poly" And ref.Value = "Presetting" Then
  61. grosswt = (use.Value * 1.11) * (101 / 100)
  62.  
  63. ElseIf check.Value >= 501 And check.Value <= 999 And ctn = "60%Cotton40%Poly" And ref.Value = "Sueded" Then
  64. grosswt = (use.Value * 1.11) * (101 / 100)
  65.  
  66. ElseIf check.Value >= 501 And check.Value <= 999 And ctn = "60%Cotton40%Poly" And ref.Value = "Brushing" Then
  67. grosswt = (use.Value * 1.11) * (115 / 100)
  68.  
  69. ElseIf check.Value >= 501 And check.Value <= 999 And ctn = "60%Cotton40%Poly" And ref.Value = "Printing" Then
  70. grosswt = (use.Value * 1.11) * (101 / 100)
  71.  
  72. '100%c lbs between 501 and 999
  73.  
  74. ElseIf check.Value >= 501 And check.Value <= 999 And ctn = "100%Cotton" And ref.Value = "Bio" Then
  75. grosswt = (use.Value * 1.12) * (102 / 100)
  76.  
  77. ElseIf check.Value >= 501 And check.Value <= 999 And ctn = "100%Cotton" And ref.Value = "Presetting" Then
  78. grosswt = (use.Value * 1.12) * (101 / 100)
  79.  
  80. ElseIf check.Value >= 501 And check.Value <= 999 And ctn = "100%Cotton" And ref.Value = "Sueded" Then
  81. grosswt = (use.Value * 1.12) * (101 / 100)
  82.  
  83. ElseIf check.Value >= 501 And check.Value <= 999 And ctn = "100%Cotton" And ref.Value = "Brushing" Then
  84. grosswt = (use.Value * 1.12) * (115 / 100)
  85.  
  86. ElseIf check.Value >= 501 And check.Value <= 999 And ctn = "100%Cotton" And ref.Value = "Printing" Then
  87. grosswt = (use.Value * 1.12) * (101 / 100)
  88.  
  89.  
  90. '60%c40%p lbs between 1000 and 2000
  91.  
  92. ElseIf check.Value >= 1000 And check.Value <= 2000 And ctn = "60%Cotton40%Poly" And ref.Value = "Bio" Then
  93. grosswt = (use.Value * 1.07) * (102 / 100)
  94.  
  95. ElseIf check.Value >= 1000 And check.Value <= 2000 And ctn = "60%Cotton40%Poly" And ref.Value = "Presetting" Then
  96. grosswt = (use.Value * 1.07) * (101 / 100)
  97.  
  98. ElseIf check.Value >= 1000 And check.Value <= 2000 And ctn = "60%Cotton40%Poly" And ref.Value = "Sueded" Then
  99. grosswt = (use.Value * 1.07) * (101 / 100)
  100.  
  101. ElseIf check.Value >= 1000 And check.Value <= 2000 And ctn = "60%Cotton40%Poly" And ref.Value = "Brushing" Then
  102. grosswt = (use.Value * 1.07) * (115 / 100)
  103.  
  104. ElseIf check.Value >= 1000 And check.Value <= 2000 And ctn = "60%Cotton40%Poly" And ref.Value = "Printing" Then
  105. grosswt = (use.Value * 1.07) * (101 / 100)
  106.  
  107.  
  108. '100% lbs between 1000 and 2000
  109.  
  110. ElseIf check.Value >= 1000 And check.Value <= 2000 And ctn = "100%Cotton" And ref.Value = "Bio" Then
  111. grosswt = (use.Value * 1.08) * (102 / 100)
  112.  
  113. ElseIf check.Value >= 1000 And check.Value <= 2000 And ctn = "100%Cotton" And ref.Value = "Presetting" Then
  114. grosswt = (use.Value * 1.08) * (101 / 100)
  115.  
  116. ElseIf check.Value >= 1000 And check.Value <= 2000 And ctn = "100%Cotton" And ref.Value = "Sueded" Then
  117. grosswt = (use.Value * 1.08) * (101 / 100)
  118.  
  119. ElseIf check.Value >= 1000 And check.Value <= 2000 And ctn = "100%Cotton" And ref.Value = "Brushing" Then
  120. grosswt = (use.Value * 1.08) * (115 / 100)
  121.  
  122. ElseIf check.Value >= 1000 And check.Value <= 2000 And ctn = "100%Cotton" And ref.Value = "Printing" Then
  123. grosswt = (use.Value * 1.08) * (101 / 100)
  124.  
  125.  
  126. '60%c40%p lbs between 2001 and 4999
  127.  
  128. ElseIf check.Value >= 2001 And check.Value <= 4999 And ctn = "60%Cotton40%Poly" And ref.Value = "Bio" Then
  129. grosswt = (use.Value * 1.05) * (102 / 100)
  130.  
  131. ElseIf check.Value >= 2001 And check.Value <= 4999 And ctn = "60%Cotton40%Poly" And ref.Value = "Presetting" Then
  132. grosswt = (use.Value * 1.05) * (101 / 100)
  133.  
  134. ElseIf check.Value >= 2001 And check.Value <= 4999 And ctn = "60%Cotton40%Poly" And ref.Value = "Sueded" Then
  135. grosswt = (use.Value * 1.05) * (101 / 100)
  136.  
  137. ElseIf check.Value >= 2001 And check.Value <= 4999 And ctn = "60%Cotton40%Poly" And ref.Value = "Brushing" Then
  138. grosswt = (use.Value * 1.05) * (115 / 100)
  139.  
  140. ElseIf check.Value >= 2001 And check.Value <= 4999 And ctn = "60%Cotton40%Poly" And ref.Value = "Printing" Then
  141. grosswt = (use.Value * 1.05) * (101 / 100)
  142.  
  143. '100% lbs between 2001 and 4999
  144.  
  145. ElseIf check.Value >= 2001 And check.Value <= 4999 And ctn = "100%Cotton" And ref.Value = "Bio" Then
  146. grosswt = (use.Value * 1.08) * (102 / 100)
  147.  
  148. ElseIf check.Value >= 2001 And check.Value <= 4999 And ctn = "100%Cotton" And ref.Value = "Presetting" Then
  149. grosswt = (use.Value * 1.08) * (101 / 100)
  150.  
  151. ElseIf check.Value >= 2001 And check.Value <= 4999 And ctn = "100%Cotton" And ref.Value = "Sueded" Then
  152. grosswt = (use.Value * 1.08) * (101 / 100)
  153.  
  154. ElseIf check.Value >= 2001 And check.Value <= 4999 And ctn = "100%Cotton" And ref.Value = "Brushing" Then
  155. grosswt = (use.Value * 1.08) * (115 / 100)
  156.  
  157. ElseIf check.Value >= 2001 And check.Value <= 4999 And ctn = "100%Cotton" And ref.Value = "Printing" Then
  158. grosswt = (use.Value * 1.08) * (101 / 100)
  159.  
  160. '60%c40%p lbs between 5000 and 8000
  161.  
  162. ElseIf check.Value >= 5000 And check.Value <= 8000 And ctn = "60%Cotton40%Poly" And ref.Value = "Bio" Then
  163. grosswt = (use.Value * 1.05) * (102 / 100)
  164.  
  165. ElseIf check.Value >= 5000 And check.Value <= 8000 And ctn = "60%Cotton40%Poly" And ref.Value = "Presetting" Then
  166. grosswt = (use.Value * 1.05) * (101 / 100)
  167.  
  168. ElseIf check.Value >= 5000 And check.Value <= 8000 And ctn = "60%Cotton40%Poly" And ref.Value = "Sueded" Then
  169. grosswt = (use.Value * 1.05) * (101 / 100)
  170.  
  171. ElseIf check.Value >= 5000 And check.Value <= 8000 And ctn = "60%Cotton40%Poly" And ref.Value = "Brushing" Then
  172. grosswt = (use.Value * 1.05) * (115 / 100)
  173.  
  174. ElseIf check.Value >= 5000 And check.Value <= 8000 And ctn = "60%Cotton40%Poly" And ref.Value = "Printing" Then
  175. grosswt = (use.Value * 1.05) * (101 / 100)
  176.  
  177. '100% lbs between 5000 and 8000
  178.  
  179. ElseIf check.Value >= 5000 And check.Value <= 8000 And ctn = "100%Cotton" And ref.Value = "Bio" Then
  180. grosswt = (use.Value * 1.07) * (102 / 100)
  181.  
  182. ElseIf check.Value >= 5000 And check.Value <= 8000 And ctn = "100%Cotton" And ref.Value = "Presetting" Then
  183. grosswt = (use.Value * 1.07) * (101 / 100)
  184.  
  185. ElseIf check.Value >= 5000 And check.Value <= 8000 And ctn = "100%Cotton" And ref.Value = "Sueded" Then
  186. grosswt = (use.Value * 1.07) * (101 / 100)
  187.  
  188. ElseIf check.Value >= 5000 And check.Value <= 8000 And ctn = "100%Cotton" And ref.Value = "Brushing" Then
  189. grosswt = (use.Value * 1.07) * (115 / 100)
  190.  
  191. ElseIf check.Value >= 5000 And check.Value <= 8000 And ctn = "100%Cotton" And ref.Value = "Printing" Then
  192. grosswt = (use.Value * 1.07) * (101 / 100)
  193.  
  194. '60%c40%p lbs between 8001 and 10000
  195.  
  196. ElseIf check.Value >= 8001 And check.Value <= 10000 And ctn = "60%Cotton40%Poly" And ref.Value = "Bio" Then
  197. grosswt = (use.Value * 1.05) * (102 / 100)
  198.  
  199. ElseIf check.Value >= 8001 And check.Value <= 10000 And ctn = "60%Cotton40%Poly" And ref.Value = "Presetting" Then
  200. grosswt = (use.Value * 1.05) * (101 / 100)
  201.  
  202. ElseIf check.Value >= 8001 And check.Value <= 10000 And ctn = "60%Cotton40%Poly" And ref.Value = "Sueded" Then
  203. grosswt = (use.Value * 1.05) * (101 / 100)
  204.  
  205. ElseIf check.Value >= 8001 And check.Value <= 10000 And ctn = "60%Cotton40%Poly" And ref.Value = "Brushing" Then
  206. grosswt = (use.Value * 1.05) * (115 / 100)
  207.  
  208. ElseIf check.Value >= 8001 And check.Value <= 10000 And ctn = "60%Cotton40%Poly" And ref.Value = "Printing" Then
  209. grosswt = (use.Value * 1.05) * (101 / 100)
  210.  
  211. '100% lbs between 8001 and 10000
  212.  
  213. ElseIf check.Value >= 8001 And check.Value <= 10000 And ctn = "100%Cotton" And ref.Value = "Bio" Then
  214. grosswt = (use.Value * 1.07) * (102 / 100)
  215.  
  216. ElseIf check.Value >= 8001 And check.Value <= 10000 And ctn = "100%Cotton" And ref.Value = "Presetting" Then
  217. grosswt = (use.Value * 1.07) * (101 / 100)
  218.  
  219. ElseIf check.Value >= 8001 And check.Value <= 10000 And ctn = "100%Cotton" And ref.Value = "Sueded" Then
  220. grosswt = (use.Value * 1.07) * (101 / 100)
  221.  
  222. ElseIf check.Value >= 8001 And check.Value <= 10000 And ctn = "100%Cotton" And ref.Value = "Brushing" Then
  223. grosswt = (use.Value * 1.07) * (115 / 100)
  224.  
  225. ElseIf check.Value >= 8001 And check.Value <= 10000 And ctn = "100%Cotton" And ref.Value = "Printing" Then
  226. grosswt = (use.Value * 1.07) * (101 / 100)
  227.  
  228.  
  229. End If
  230.  
  231. myfunc = grosswt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement