title: I am unable to change the value of a cell in my spreadsheet
body: <p>For some reason I can't change the value using a VBA function in a spreadsheet, I am infuriated at this moment. I have wasted an hour of my life because of this line. Can someone please tell me why it is not working?</p>
  
  <pre><code>Public Function GenerateDetailedReport(data As Range)
       Worksheets(5).Cells(2, 2).Value2 = "Maybe"
       GenerateDetailedReport = 1
  End Function
  </code></pre>
  
  <p>I keep getting <code>#VALUE!</code> error every time I run it. I can read the cell value with no issue, but I cannot change the value.</p>