Khanonline
04-21-2015, 03:22 AM
Hello All,
I need to work on reverse of Text and I am having caption in the Table like in below table.
This is Caption
12
12
.tset si sihT
12
12
This is test.
12
12
This is test.
12
12
This is test.
12
12
This is test.
12
12
I want if I select all the Captions in Table it should apply the macro on it. Can somebody help me to alter the code or do this for me?
Result f After applying Macro:
noitpaC si sihT
12
12
.tset si sihT
12
12
.tset si sihT
12
12
.tset si sihT
12
12
.tset si sihT
12
12
.tset si sihT
12
12
The Macro is:
Dim oRng As Range
Dim sRevText As String
Dim i As Long
sRevText = ""
Set oRng = Selection.Range
For i = oRng.Characters.Count To 1 Step -1
sRevText = sRevText & oRng.Characters(i)
Next i
oRng.Text = sRevText
Please make the alteration or assist me in doing it with efficient manner.
Thanks a bunch.
Regards
Khanonline
I need to work on reverse of Text and I am having caption in the Table like in below table.
This is Caption
12
12
.tset si sihT
12
12
This is test.
12
12
This is test.
12
12
This is test.
12
12
This is test.
12
12
I want if I select all the Captions in Table it should apply the macro on it. Can somebody help me to alter the code or do this for me?
Result f After applying Macro:
noitpaC si sihT
12
12
.tset si sihT
12
12
.tset si sihT
12
12
.tset si sihT
12
12
.tset si sihT
12
12
.tset si sihT
12
12
The Macro is:
Dim oRng As Range
Dim sRevText As String
Dim i As Long
sRevText = ""
Set oRng = Selection.Range
For i = oRng.Characters.Count To 1 Step -1
sRevText = sRevText & oRng.Characters(i)
Next i
oRng.Text = sRevText
Please make the alteration or assist me in doing it with efficient manner.
Thanks a bunch.
Regards
Khanonline