Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default crate formula in VBA


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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default crate formula in VBA

Activecell.Formula = "=SUM(A1:A10)"

etc.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Tadashii" wrote in
message ...

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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default crate formula in VBA

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" wrote in
message ...

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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default crate formula in VBA


That's exactly what i need thanks NickHK


--
Tadashii
------------------------------------------------------------------------
Tadashii's Profile: http://www.excelforum.com/member.php...o&userid=23918
View this thread: http://www.excelforum.com/showthread...hreadid=499650

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I crate a function for week of year + year in same cell. patty ann Excel Worksheet Functions 1 March 16th 08 06:34 PM
Add data to cell to crate formula nobbyknownowt Excel Discussion (Misc queries) 4 April 14th 06 07:23 AM
Crate group of date, with Dynamic Range in pivot table not working Tiya Excel Discussion (Misc queries) 3 March 1st 06 02:26 PM
help how to crate group of date with Dynamic Range? Tiya Excel Discussion (Misc queries) 0 February 27th 06 06:49 PM
Commenting custom formula fields/formula on formula editor Muxer Excel Programming 2 July 24th 03 01:02 AM


All times are GMT +1. The time now is 08:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"