title: Function using VBA
body: <p>I want to convert this code into a function format. I've tried inputting function instead of sub version, but when I type =version into a cell nothing shows up. any help is appreciated  </p>
  
  <pre><code>Sub Version()
  
      If Range("B2").Value = 20.2 Then
          Range("B22").Value = 20.3
  
      If Range("B2").Value = 20.3 Then
          Range("B22").Value = 20.1
      End If
      End If
  
  End Sub
  </code></pre>