title: Loop or another instrument for range in Excel VBA
body: <p>I'm not programmer but trying to automate my routine job in <strong>VBA</strong> Excel. </p>
  
  <p>I wrote "If else" code in VBA for my table for one row and it works. But in my table has 20 rows. And I need to work "If else" condition in every row. Variable has to change data, execute condition and go to another row and etc. </p>
  
  <p>I imagine logic of code, suppose I need <strong>LOOP</strong> for range. But I don't understand syntax of Loop. </p>
  
  <p>Below my code.</p>
  
  <p><strong>Variables</strong>: text, score1, score2, score3  - has to change cell in every row. After execution go to next row below him.</p>
  
  <p><strong>If Else</strong> condition has to work in every row (of range). After execution go to next row below him.</p>
  
  <p><strong>Result</strong> - after "past value" go to next row below him and past there another value of next <strong>If Else</strong> condition of new row.</p>
  
  <p>Help me to solve this task, please.</p>
  
  <pre><code>Sub Test()
  
  Dim score1 As Double, score2 As Double, score3 As Double, result As String, text As String
  
  text = Range("G3").Value
  score1 = Range("C3").Value
  score2 = Range("D3").Value
  score3 = Range("E3").Value
  
  name1 = "Company A"       
  name2 = "Company B"
  currenc = "Dollars"
  
  
  If score1 = 0 And score2 = 0 Then
      result = text + " " + name1 + " didn't count and " + name2 + " didn't count."
  
  ElseIf score1 = score2 Then
      result = text + " " + name1 + " some code..............."
  
  ElseIf score1 &gt; score2 And score2 &lt;&gt; 0 Then
      result = text + " " + name1 + "  some code..............."
  
  ElseIf score1 &lt; score2 And score1 &lt;&gt; 0 Then
      result = text + " " + name1 + "  some code..............."
  
  Else
      result = text + " 00000000"
  
  End If
  
  Range("I3").Value = result
  
  End Sub
  </code></pre>