• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Defining an excel function with applescript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Defining an excel function with applescript
      • From: Paul Berkowitz <email@hidden>
    • Re: Defining an excel function with applescript
      • From: Eric C Saunders <email@hidden>
  • Prev by Date: Re: Photoshop - positionning layers
  • Next by Date: Re: Defining an excel function with applescript
  • Previous by thread: Re: Photoshop - positionning layers
  • Next by thread: Re: Defining an excel function with applescript
  • Index(es):
    • Date
    • Thread