# For Mark W - Palindrome question

Posted by Steve on January 11, 2001 11:19 AM

Mark, care to share your solution for the brainteaser about the palindrome?

Posted by Mark W. on January 11, 2001 11:29 AM

I created a Rube Goldberg formula...

=AND(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)=MID(A1,TREND((LEN(A1)+1)*{0,1},(LEN(A1)+1)*{1,0},ROW(INDIRECT("1:"&LEN(A1)))),1))

I struggled for quite a while with how to rotate an
array constant...and settled on:

TREND((LEN(A1)+1)*{0,1},(LEN(A1)+1)*{1,0},ROW(INDIRECT("1:"&LEN(A1))))

Aladin Akyurek's approach was much sweeter!

Are you work'n on my latest (Anagram) brainteaser?

Posted by Steve on January 11, 2001 11:39 AM

I'm afraid I'm still a novice. This is way beyond my abilities. But I'm very interested because I had to write FORTRAN codes for the same problem when I was in college years ago.

One question on the palindrome formula: is there anyway to tweak the formula so that it ignores spaces and cases? I tried "A man a plan a canal Panama" and I got "FALSE".

Posted by Mark W. on January 11, 2001 11:48 AM

Up front you could SUBSTITUTE all " " with "".

I intentionally side stepped this issue by limiting
the request to a single word.