Reverse the String

Can you please let us know how to reverse the particular string in Excel?
For Eg: 'APPLE' should to reversed like 'ELPPA'

Works for all lengths up to 255

In the MREXCEL forum I received the following formula.

=MID(SUMPRODUCT(MID(A1,ROW($A$1:INDEX($A:$A,LEN(A1),1)),1)*10^(ROW($A$1:INDEX($A:$A,LEN(A1)))-LEN(A1)-1)),3,255)

Nick's picture

that's only for reversing the

a really impressive formula

unfortunately... won't work for text, only numbers..

Reverse the string - vba solution

Hi,

In terms of formula, i don't see other solution than the one proposed by Nick.

With the VBA language, it's possible thanks to the StrReverse function.
sub demo
MsgBox StrReverse("apple")
end sub

Nick's picture

if the strings are all less

if the strings are all less than 5 chars you can use this:
=LEFT(RIGHT(A1,1),1)&LEFT(RIGHT(A1,2),1)&LEFT(RIGHT(A1,3),1)&LEFT(RIGHT(A1,4),1)&LEFT(RIGHT(A1,5),1)

if more than 5, just add "&LEFT(RIGHT(A1,6),1)" etc...