For first of all, this is my first time when try to use vba
in excel
. I know nothing about it.
I try to create a new function, into excel
, to set a value in a specific cell.
I have this module:
Public Function SETVALUE(cell As Range, newValue As Integer) As String
cell.value = newValue
SETVALUE = "-"
End Function
This is my module:
If I type: =SETVALUE(A2, 1)
in cell A1
, it not work.
In cell A1
appear #Value!
and in cell A2
appear nothing.