title: Looking for the last row and have it fill the other column
body: <p>I am newbie in here in Stackoverflow and in the VBA Field. Actually I need some help with my code.</p>
  
  <p>I have created a macro and it seems there is something missing in my code.</p>
  
  <p><strong>Scenario</strong>:</p>
  
  <ol>
  <li>If A1 = 0.5 then in column B1 should answered FLAT </li>
  <li>If A2 = 2 then in column B2 should answered as PER </li>
  <li>If A3 = 5 then in column B3 should answered as PER </li>
  <li>If A4 = 0.1 then in column B4 should answered FLAT </li>
  <li>If A5 = 0.2 then in column B5 should answered FLAT </li>
  </ol>
  
  <p>The code that I have only looking for one cell. What I want is in column B my code will apply until the last row of column "A" that has data</p>
  
  <pre><code>Sub exe()
      Dim number As Integer, result As String
  
      number = Range("a1").Value
  
      If number &lt;= 1 Then
          result = "Flat"
      Else
          result = “Per”
      End If
  
      'enter code here
      Range("b1").Value = result
  End Sub
  </code></pre>