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
William - 13 Mar 2006 23:05 GMT
Hi
MsgBox StrReverse(ActiveCell)

Signature
Regards
William
XL2003
willwest22@yahoo.com
> Hi,
>
[quoted text clipped - 4 lines]
> regards,
> Peter
Trevor Shuttleworth - 13 Mar 2006 23:19 GMT
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
> Hi,
>
[quoted text clipped - 4 lines]
> regards,
> Peter
Gary Keramidas - 13 Mar 2006 23:33 GMT
easiest way
Sub test()
Range("a1") = "excel"
Range("a2") = StrReverse(Range("a1"))
End Sub

Signature
Gary
> Hi,
>
[quoted text clipped - 4 lines]
> regards,
> Peter
NickHK - 14 Mar 2006 03:16 GMT
Peterke,
I have seen a few requests for this in the past.
Out of curiosity: Why ?
NickHK
> Hi,
>
[quoted text clipped - 4 lines]
> regards,
> Peter
Myles - 14 Mar 2006 04:44 GMT
One possible reason: as a way to encript a text, albeit too simplistic
as the scrambling could be improved through randonmization.
Myles.

Signature
Myles
CG_Squared - 24 May 2006 16:18 GMT
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.
> Peterke,
> I have seen a few requests for this in the past.
[quoted text clipped - 10 lines]
> > regards,
> > Peter