View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default Duplicate phrases in one cell

On Mon, 18 May 2009 12:19:29 +0100, "Peter T" <peter_t@discussions wrote:

I don't fully follow the objective but based solely on your examples, it
looks like all you need to do is compare the left half with the right half.
You could do that with a VBA (could be a UDF) or with a simple formula, eg

=IF(LEFT(A1,LEN(A1)/2)=RIGHT(A1,LEN(A1)/2),LEFT(A1,LEN(A1)/2),A1)


Very simple, and neat.
--ron