title: IF ELSE THEN in Excel
body: <p>I have this code in Excel's visual basic. I tried without a, b and c and just use Range("C2"), F2, G2, but it doesn't work too. I really don't know why this doesn't work, can someone help me ? :)</p>
  
  <pre><code>Sub pourcentremiseport()
  Dim a As Integer
  Dim b As Integer
  Dim c As Integer
  
  a = Range("C2").Value
  
  If a &lt; 6 Then
   b = 9.6
   c = 0 
  
  ElseIf a &gt;= 6 And a &lt; 20 Then
   b = 0
   c = 10
  
  Else
   b = 0
   c = 25
  
   End If
  
   b = Range("F2").Value
   c = Range("G2").Value
  
  End Sub
  </code></pre>