• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Convert a String into Palindrome

Asheesh

Excel Ninja
Hi Experts - I was given a string and asked to reverse the string in the next cell i.e. it should be a palindrome, but without using vba or helper columns..

I tried my best to convert it however it doesnt seem to be possible with single formulae..

My Approach -

I first split each character across the rows and then I am stuck because concatenate is not compatible with arrays..

Any help or guidance will be much appreciated..
 
I found it somewhere!!

check it helps..

=TRIM(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)
&LEFT(RIGHT(" "&A1,6),1)
&LEFT(RIGHT(" "&A1,7),1)
&LEFT(RIGHT(" "&A1,8),1)
&LEFT(RIGHT(" "&A1,9),1)
&LEFT(RIGHT(" "&A1,10),1)
&LEFT(RIGHT(" "&A1,11),1)
&LEFT(RIGHT(" "&A1,12),1)
&LEFT(RIGHT(" "&A1,13),1)
&LEFT(RIGHT(" "&A1,14),1)
&LEFT(RIGHT(" "&A1,15),1)
&LEFT(RIGHT(" "&A1,16),1)
&LEFT(RIGHT(" "&A1,17),1)
&LEFT(RIGHT(" "&A1,18),1)
&LEFT(RIGHT(" "&A1,19),1)
&LEFT(RIGHT(" "&A1,20),1))
 
Deepak - Thank you...I Initially thought of the same solution, however, this formula is limited to 20 characters...but I am looking for a formula which can deal with a variable length..
 
Back
Top