Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / May 2006

Tip: Looking for answers? Try searching our database.

reverse text

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Peterke - 13 Mar 2006 22:42 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.