+ Reply to Thread
Results 1 to 7 of 7

reverse text

  1. #1
    Peterke
    Guest

    reverse text

    Hi,

    i have an unusual question.
    Is it possible to reverse any text in excel using vba?
    for instance when i type "excel" it would look like "lecxe" on the screen.

    regards,
    Peter



  2. #2
    William
    Guest

    Re: reverse text

    Hi

    MsgBox StrReverse(ActiveCell)
    --

    Regards

    William

    XL2003

    willwest22@yahoo.com


    "Peterke" <Peter@peterke.be> wrote in message
    news:pHlRf.313772$sy1.9686113@phobos.telenet-ops.be...
    > Hi,
    >
    > i have an unusual question.
    > Is it possible to reverse any text in excel using vba?
    > for instance when i type "excel" it would look like "lecxe" on the screen.
    >
    > regards,
    > Peter
    >
    >




  3. #3
    Trevor Shuttleworth
    Guest

    Re: reverse text

    Peter

    see if this works for you:

    Function ReverseText(rt As Range)
    Application.Volatile
    Dim iLength As Integer
    Dim iCount As Integer
    iLength = Len(rt)
    ReverseText = ""
    For iCount = iLength To 1 Step -1
    ReverseText = ReverseText & _
    Mid(rt.Value, iCount, 1)
    Next iCount
    End Function

    Regards

    Trevor


    "Peterke" <Peter@peterke.be> wrote in message
    news:pHlRf.313772$sy1.9686113@phobos.telenet-ops.be...
    > Hi,
    >
    > i have an unusual question.
    > Is it possible to reverse any text in excel using vba?
    > for instance when i type "excel" it would look like "lecxe" on the screen.
    >
    > regards,
    > Peter
    >
    >




  4. #4
    Gary Keramidas
    Guest

    Re: reverse text

    easiest way

    Sub test()
    Range("a1") = "excel"
    Range("a2") = StrReverse(Range("a1"))


    End Sub


    --


    Gary


    "Peterke" <Peter@peterke.be> wrote in message
    news:pHlRf.313772$sy1.9686113@phobos.telenet-ops.be...
    > Hi,
    >
    > i have an unusual question.
    > Is it possible to reverse any text in excel using vba?
    > for instance when i type "excel" it would look like "lecxe" on the screen.
    >
    > regards,
    > Peter
    >
    >




  5. #5
    NickHK
    Guest

    Re: reverse text

    Peterke,
    I have seen a few requests for this in the past.
    Out of curiosity: Why ?

    NickHK

    "Peterke" <Peter@peterke.be> wrote in message
    news:pHlRf.313772$sy1.9686113@phobos.telenet-ops.be...
    > Hi,
    >
    > i have an unusual question.
    > Is it possible to reverse any text in excel using vba?
    > for instance when i type "excel" it would look like "lecxe" on the screen.
    >
    > regards,
    > Peter
    >
    >




  6. #6
    Forum Contributor
    Join Date
    11-11-2005
    Posts
    267
    One possible reason: as a way to encript a text, albeit too simplistic as the scrambling could be improved through randonmization.

    Myles.

  7. #7
    CG_Squared
    Guest

    Re: reverse text

    NickHK

    An example - let's say you were printing on a piece of paper that was going
    to be folded into thirds. On one side of the outside you print an address
    block and on the other outside you wish to print a message. The message
    would have to be reversed to make it readable.

    "NickHK" wrote:

    > Peterke,
    > I have seen a few requests for this in the past.
    > Out of curiosity: Why ?
    >
    > NickHK
    >
    > "Peterke" <Peter@peterke.be> wrote in message
    > news:pHlRf.313772$sy1.9686113@phobos.telenet-ops.be...
    > > Hi,
    > >
    > > i have an unusual question.
    > > Is it possible to reverse any text in excel using vba?
    > > for instance when i type "excel" it would look like "lecxe" on the screen.
    > >
    > > regards,
    > > Peter
    > >
    > >

    >
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1