ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   reverse text (https://www.excelbanter.com/excel-programming/355907-reverse-text.html)

Peterke

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



William[_2_]

reverse text
 
Hi

MsgBox StrReverse(ActiveCell)
--

Regards

William

XL2003




"Peterke" wrote in message
...
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





Trevor Shuttleworth

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" wrote in message
...
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





Gary Keramidas

reverse text
 
easiest way

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


End Sub


--


Gary


"Peterke" wrote in message
...
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





NickHK

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

NickHK

"Peterke" wrote in message
...
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





Myles[_50_]

reverse text
 

One possible reason: as a way to encript a text, albeit too simplistic
as the scrambling could be improved through randonmization.

Myles.


--
Myles
------------------------------------------------------------------------
Myles's Profile: http://www.excelforum.com/member.php...o&userid=28746
View this thread: http://www.excelforum.com/showthread...hreadid=521942


CG_Squared

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" wrote in message
...
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







All times are GMT +1. The time now is 05:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com