Reversing active cell contents using the vba code. Place this code in to a standard module. Select the cell you want to reverse and run the macro.
Sub Reverse()
If Not ActiveCell.HasFormula Then
sRaw = ActiveCell.Text
sNew = ""
For J = 1 To Len(sRaw)
sNew = Mid(sRaw, J, 1) + sNew
Next J
ActiveCell.Value = sNew
End If
End Sub
Sub Reverse()
If Not ActiveCell.HasFormula Then
sRaw = ActiveCell.Text
sNew = ""
For J = 1 To Len(sRaw)
sNew = Mid(sRaw, J, 1) + sNew
Next J
ActiveCell.Value = sNew
End If
End Sub
No comments:
Post a Comment