Formula?

G

Giedrius

Could someone to help me to write a formula which could do such thing:

"mother" to change to "rehtom"

Im not a beginer at using excel but can not think about righ
formula.


Than
 
J

JMay

In a standard module paste:

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

in A1 -->> Mother
Formula in B1 =ReverseString(A1) --- Displays --->> rehtoM

HTH
 
M

mzehr

To do this you will need a User Defined Function using the
following VBA formula from John Walkenbach:

Option Explicit

Function REVERSETEXT(text) As String
' Returns its argument, reversed
Dim TextLen As Integer
Dim i As Integer
TextLen = Len(text)
For i = TextLen To 1 Step -1
REVERSETEXT = REVERSETEXT & Mid(text, i, 1)
Next i
End Function

HTH
 
C

clement

Voila, j'ai un tableau de + de 1000 clients, avec leurs coordonnees sous excel. Je voudrais que quand je rentre le nom d'un client ds une cellule specifique, il m'enmene directement sur la ligne du client. Tu connais la fonction?
 
R

Ron Rosenfeld

Could someone to help me to write a formula which could do such thing:

"mother" to change to "rehtom"

Im not a beginer at using excel but can not think about right
formula.


Thanx

If you Excel 2002 or later, you could use this UDF:

Function Reverse(str As String) As String
Reverse = StrReverse(str)
End Function


--ron
 
Top