Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default can one write one's own Excel Function?

Can one write one's own Excel Function?
For example, suppose I've got calendar dates in one column,
and I want to translate them to Italian in another column.
The Italian translation should change automatically when
I change the calendar date. The "Italian column" would be
coded something like =Italian(F3).

Is there any way to do this?

- Elliott Baral


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default can one write one's own Excel Function?

Elliott,

Yes, just call the procedure Function instead of Sub. A simple example is

Function inc(rng as Range)

if rng.Count 1 Then
CvErr(xlErrValue)
Exit Function
End If

inc= rng.Value + 1

End Function

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Elliott Baral" wrote in message
...
Can one write one's own Excel Function?
For example, suppose I've got calendar dates in one column,
and I want to translate them to Italian in another column.
The Italian translation should change automatically when
I change the calendar date. The "Italian column" would be
coded something like =Italian(F3).

Is there any way to do this?

- Elliott Baral




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default can one write one's own Excel Function?

Yes, of course. For example open VBA, insert a module and then insert this
in the module

Function french(myword)
Select Case myword
Case Is = "oui"
french = "yes"
Case Is = "merci"
french = "Thank you"
Case Else
french = "Beats me!"
End Select
End Function


"Elliott Baral" wrote in message
...
Can one write one's own Excel Function?
For example, suppose I've got calendar dates in one column,
and I want to translate them to Italian in another column.
The Italian translation should change automatically when
I change the calendar date. The "Italian column" would be
coded something like =Italian(F3).

Is there any way to do this?

- Elliott Baral




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
SOS! how do I write a customized function to do multiple-value lookupin Excel 2007? LunaMoon Excel Discussion (Misc queries) 1 December 1st 09 03:40 AM
Is there a write-multi-cell-at-once function in VBS for Excel? Tony Bansten Excel Discussion (Misc queries) 2 June 21st 08 12:14 AM
Pleeze Help! Export Excel data into a form in a Word Doc...this one's tough! duugg Excel Discussion (Misc queries) 1 April 21st 06 02:35 PM
How to write IF function in Excel 2000 when there are two conditi. Dajana Excel Worksheet Functions 1 January 26th 05 02:15 PM
Write a function call into an Excel cell from VBA Conceptor Excel Programming 2 September 10th 03 05:41 PM


All times are GMT +1. The time now is 09:48 AM.

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"