Hello,
is there a possibility to create an own formula in VBA, so that it can be used in the spreadsheet like e.g. SUM(),TAN(), or ...
Thanks.
Hello,
is there a possibility to create an own formula in VBA, so that it can be used in the spreadsheet like e.g. SUM(),TAN(), or ...
Thanks.
Activecell.Formula = "=SUM(A1:A10)"
etc.
--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
"Tadashii" <[email protected]> wrote in
message news:[email protected]...
>
> Hello,
>
> is there a possibility to create an own formula in VBA, so that it can
> be used in the spreadsheet like e.g. SUM(),TAN(), or ...
>
> Thanks.
>
>
> --
> Tadashii
> ------------------------------------------------------------------------
> Tadashii's Profile:
http://www.excelforum.com/member.php...o&userid=23918
> View this thread: http://www.excelforum.com/showthread...hreadid=499650
>
Tadashii,
You mean a User Defined Function (UDF) ?
In a Standard module, something like:
Public Function MyFunction (ArgIn As Long) As String
MyFunction = "You are " & ArgIn & " years old."
End Function
Then call it from a worksheet cell. e.g,
A1: =MyFunction(1000)
NickHK
"Tadashii" <[email protected]> wrote in
message news:[email protected]...
>
> Hello,
>
> is there a possibility to create an own formula in VBA, so that it can
> be used in the spreadsheet like e.g. SUM(),TAN(), or ...
>
> Thanks.
>
>
> --
> Tadashii
> ------------------------------------------------------------------------
> Tadashii's Profile:
http://www.excelforum.com/member.php...o&userid=23918
> View this thread: http://www.excelforum.com/showthread...hreadid=499650
>
That's exactly what i need thanks NickHK
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks