5 replies
no direct formula but try this:
A1 = 1234
B1 = MID(A1,4,1) & MID(A1,3,1) & MID(A1,2,1) & MID(A1,1,1)
The result is B1 = 4321
hope this helps.
by vlad7
by dklippert
For 2000 and above:
This function ? MyStrReverse():
Function MyStrReverse(s As String) As String
Dim i As Long, rslt As String
For i = Len(s) To 1 Step -1
rslt = rslt & Mid(s, i, 1)
Next i
MyStrReverse = rslt
End Function
Combined with an on event action:
(Right click the tab and choose View code, Paste this code in the Visual Basic Editor):
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
ActiveCell.Value = MyStrReverse(ActiveCell)
End Sub
You have to reselect the cell to see the change.
by vlad7
by vlad7
This discussion is closed to new replies.
Trending Software posts
Sort by Trending