Defining an excel function with applescript
Defining an excel function with applescript
- Subject: Defining an excel function with applescript
- From: "steen knudsen" <email@hidden>
- Date: Tue, 14 Oct 2008 19:08:50 +0200
Defining an excel function with applescript
When using excel on windows I have been able to apply a function by the use of Visual Basic.
The function enables me to get the reverse of a text string in one cell - e.g. "ABCDEFG" -> "GFEDCBA"
I am now using Excel 2008 12.1.2 on Mac. But I would still like to be able to use this function. Can I define this function by using Apple Script?
If it is possible, how do I do it?
Thanks in advance for your help
Steen Knudsen
The Visual Basic Code for the function follows below:
Function ReverseCell(Rcell As Range, Optional IsText As Boolean)
Dim i As Integer
Dim StrNewNum As String
Dim strOld As String
strOld = Trim(Rcell)
For i = 1 To Len(strOld)
StrNewNum = Mid(strOld, i, 1) & StrNewNum
Next i
If IsText = False Then
ReverseCell = CLng(StrNewNum)
Else
ReverseCell = StrNewNum
End If
End Function
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden