title: Assistance need it
body: <p>Sub or function is not defined:
  why and how to resolve it?</p>
  
  <pre><code>Sub FormulaSravnenie()
  
  'order: F=Pal, G=Lay, H = Kar, I= SPCB, J=Quantity
  'order2: L=pal, M=lay, N=box, O=subbov,P=pcs
  
  If (j2 &gt; f2) Then L2 = RoundDown(j2 / L2)
  Else: L2 = 0
  End
  If (j2 &gt; f2) Then m2 = RoundDown((j2 - f2) / g2)
  ElseIf (j2 &lt; f2 And j2 &gt; g2) Then m2 = RoundDown(j2 / g2)
  Else: m2 = 0
  End
  If (j2 &gt; f2) Then n2 = RoundDown((j2 - (f2 + g2)) / h2)
  ElseIf (j2 &lt; f2 And j2 &gt; g2) Then n2 = RoundDown(j2 - g2) / h2
  ElseIf (j2 &lt; g2 And j2 &gt; h2) Then n2 = RoundDown(j2 / h2)
  Else: n2 = 0
  End
  If (j2 &gt; f2) Then o2 = RoundDown((j2 - (f2 + g2 + h2) / i2))
  ElseIf (j2 &lt; f2 And j2 &gt; g2) Then o2 = RoundDown(j2 - (g2 + h2) / i2)
  ElseIf (j2 &lt; g2 And j2 &gt; h2) Then o2 = RoundDown(j2 - h2) / i2
  ElseIf (j2 &lt; h2 And j2 &gt; i2) Then o2 = RoundDown(j2 / i2)
  Else: o2 = 0
  End
  If (j2 &gt; 0) Then p2 = j2 - (f2 + g2 + h2 + i2)
  Else: p2 = 0
  
  End
  
  End Sub
  </code></pre>
  
  <p>[IMG]<a href="http://i60.tinypic.com/hrzs6h.jpg[/IMG]" rel="nofollow">http://i60.tinypic.com/hrzs6h.jpg[/IMG]</a></p>
  
  <p>so I want from the data F to J row to use this formulas and have the results in L to P row.</p>
  
  <pre><code>If (j2 &gt; f2) Then L2 = RoundDown(j2 / L2)
  Else: L2 = 0
  End
  </code></pre>
  
  <p>'result in L
  and so on for the next rows and formulas</p>