View Single Post
  #3   Report Post  
Jim May
 
Posts: n/a
Default

In a standard module put:

Function ReverseString(rng As Range) As String
Dim i As Integer
For i = Len(rng.Value) To 1 Step -1
ReverseString = ReverseString & Mid(rng.Value, i, 1)
Next
End Function

Then use as any other formula, say in cell B1 enter =ReverseString(A1)
HTH



"Jack Sons" wrote in message
...
Put this code in your personal.xls, then you will find this function in

your
paste function box. With 1234 in A1 and =personal.xls!reversetext(A1) in
e.g. D5 you will get 4321 in D5.

I once picked this code up in our NG. Works fine.

Jack Sons
The Netherlands

"ac512" schreef in bericht
...
How can I reverse the values of cell?
EG. 1234 appears in a cell, and I would like to change it so that it
appears as 4321???
Any help would be greatly appreciated!
Thank you