Q:

How to find duplicate substring in a word in a single cell?

I have large data in excel with names in cells like 
1   THOMASTHOMAS
2   KUMARKUMAR

The names in the cells are repeated without spaces or any other delimiter.I want to remove the duplicates from the name in a single cell.
The required output is:
1   THOMAS
2   KUMAR

Can anyone please help me the VBA or any excel function to remove duplicates from words?

A:

If there is a mix of both duplicated and not duplicated then use this formula:
=IF(LEFT(A1,LEN(A1)/2)=RIGHT(A1,LEN(A1)/2),LEFT(A1, LEN(A1)/2),A1)

