AnsweredAssumed Answered

Calculation Field - delete duplicate surname

Question asked by FionaWilson on Aug 7, 2013
Latest reply on Aug 8, 2013 by philmodjunk

Title

Calculation Field - delete duplicate surname

Post


     Hi,

     I'm trying to get a return on a name field that removes one of the surnames if they are the same. For example, if the name is:

     Mr John Wilson & Mrs Sandra Wilson

     I want it to return:

     Mr John & Mrs Sandra Wilson

     This is the best I can come up with:

     If ( MiddleWords(Name; 3 ; 1 ) = RightWords (Name ; 1) ;

     Substitute( Name; MiddleWords(Name; 3 ; 1 ) ;  "") ;  Name  )

     But this returns:

     Mr John & Mrs Sandra

     So close - help please!

     Fiona

Outcomes