3 Replies Latest reply on Jul 28, 2011 11:26 AM by philmodjunk

    Replacing text in field

    DavidTewksbury

      Title

      Replacing text in field

      Post

      I import from my local MLS into a field named “Subdivision”.  The problem is there are variations of the
      same subdivision entered (“Danforth”, “Danforth 01”, “Danforth PUD”, etc.  I want to replace all those variations
      containing “Danforth” with just “Danforth” using a formula to do this automatically.
      Can this be done?  Thanks.

        • 1. Re: Replacing text in field
          philmodjunk

          How will you be able to identify all the possible variations of each name?

          Using just the data in your example, Leftwords ( subdivisionName ; 1 ) will return just the first word which will convert all of your example names into just a single word "Danforth". Leftwords ( subdivisionName ; max ( WordCount ( subdivisionName ) - 1 ; 1 ) ) will return all but the last word and would also work with subdivision names of more than one word, provided that the variations are always a single additional word.

          From here, the possible variations are nearly unlimited, so I wouldn't be suprised if neither of the above examples worked perfectly.

          • 2. Re: Replacing text in field
            DavidTewksbury

            Thanks.  I was hoping that there may be a way to have a formula that incorporated something like: if(field contains "Danforth", "Danforth", field contents) - sort of formula.

            • 3. Re: Replacing text in field
              philmodjunk

              If ( PatternCount ( Field ; "Danforth" ) ; "Danforth" ; Field )