This is totally baffling me, and should be incredibly simple. I have this test function:
Function TestFunction(arg)
Range("Q17").Value = arg ' Does not work
TestFunction = arg
End Function
If I execute it in a cell with the "Range" line commented out it works fine and places "arg" into the cell where the function was executed from. However, if I uncomment the "Range" line (as shown), "arg" does not get placed in cell "Q17" and the function returns with #VALUE ! in the cell where the function was executed from.
What I am missing here? Thanks
Function TestFunction(arg)
Range("Q17").Value = arg ' Does not work
TestFunction = arg
End Function
If I execute it in a cell with the "Range" line commented out it works fine and places "arg" into the cell where the function was executed from. However, if I uncomment the "Range" line (as shown), "arg" does not get placed in cell "Q17" and the function returns with #VALUE ! in the cell where the function was executed from.
What I am missing here? Thanks