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
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
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
>
>
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
>
>
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
>
>
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
>
>
One possible reason: as a way to encript a text, albeit too simplistic as the scrambling could be improved through randonmization.
Myles.
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
> >
> >
>
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks