I have a VBA user defined function. Besides to assigning a value to the function, I need to assign a value to a cell which is not the cell calling the function. However, when I try to execute the code, it fails: the error #VALUE appears in the cell from which the function is called and in the other cell no value is assigned. Is it a VBA excel limitation or is there a bug in my code? Here is the code sample:
Function zz()
zz = "OK"
Row = ActiveCell.Row
col = ActiveCell.Column
Cells(Row + 1, col) = "pippi"
End Function
Many thanks.