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?
Public Function GenerateDetailedReport(data As Range)
Worksheets(5).Cells(2, 2).Value2 = "Maybe"
GenerateDetailedReport = 1
End Function
I keep getting #VALUE!
error every time I run it. I can read the cell value with no issue, but I cannot change the value.