Forum Message

Topic: Re:Excel - removing words at start of cell - replace can't do it
Posted by: Matteo Castagna
Date/Time: 18/03/15 15:12:00

Let me try to suggest a more scalable solution for your problem.
1. Let's say you have more than the two words you need to get rid of. Place all the words in a column and call that column (Define Name) "GetRidOf" as an example. This way the number of string can be anything.
2. The relevant formula that manages to get rid of all the instances of the GetRidOf names you defined, is:

=SUBSTITUTE(A1,LOOKUP(10^10,FIND(GetRidOf,A1),GetRidOf),"")

This basically search for any instance of any entry in GetRidOf in the A1 cell (I am assuming the original text is staked in column A).
THIS FORMULA WILL RETURN #N/A WHEN THERE IS NOTHING TO REPLACE
That means you need to place an error check (ISNA()) around it.


Entire Thread
TopicDate PostedPosted By
Excel - removing words at start of cell - replace can't do it18/03/15 13:31:00 George Turner
   Re:Excel - removing words at start of cell - replace can't do it18/03/15 13:40:00 Dan Murphy
      Re:Re:Excel - removing words at start of cell - replace can't do it18/03/15 15:13:00 Matteo Castagna
   Re:Excel - removing words at start of cell - replace can't do it18/03/15 14:33:00 Will Watson
      Re:Re:Excel - removing words at start of cell - replace can't do it18/03/15 15:05:00 Andrew Cumming
         Re:Re:Re:Excel - removing words at start of cell - replace can't do it18/03/15 15:20:00 Andrew Cumming
      Re:Re:Excel - removing words at start of cell - replace can't do it18/03/15 15:14:00 Matteo Castagna
         Re:Re:Re:Excel - removing words at start of cell - replace can't do it18/03/15 15:21:00 Will Watson
            Re:Re:Re:Re:Excel - removing words at start of cell - replace can't do it18/03/15 15:27:00 Matteo Castagna
      Re:Re:Excel - removing words at start of cell - replace can't do it18/03/15 15:47:00 George Turner
         Re:Re:Re:Excel - removing words at start of cell - replace can't do it18/03/15 16:04:00 Will Watson
            Re:Re:Re:Re:Excel - removing words at start of cell - replace can't do it18/03/15 16:22:00 Matteo Castagna
               Re:Re:Re:Re:Re:Excel - removing words at start of cell - replace can't do it18/03/15 16:33:00 Will Watson
                  Re:Re:Re:Re:Re:Re:Excel - removing words at start of cell - replace can't do it18/03/15 16:34:00 Matteo Castagna
                     Re:Re:Re:Re:Re:Re:Re:Excel - removing words at start of cell - replace can't do it18/03/15 16:37:00 Will Watson
                        Re:Re:Re:Re:Re:Re:Re:Re:Excel - removing words at start of cell - replace can't do it18/03/15 16:53:00 Matteo Castagna
   Re:Excel - removing words at start of cell - replace can't do it18/03/15 15:12:00 Matteo Castagna
      Re:Re:Excel - removing words at start of cell - replace can't do it18/03/15 16:45:00 George Turner
         Re:Re:Re:Excel - removing words at start of cell - replace can't do it18/03/15 16:53:00 Will Watson
         Re:Re:Re:Excel - removing words at start of cell - replace can't do it18/03/15 16:56:00 Matteo Castagna
            Re:Re:Re:Re:Excel - removing words at start of cell - replace can't do it18/03/15 18:35:00 John Ridout
   Re:Excel - removing words at start of cell - replace can't do it18/03/15 18:50:00 Peter Grist

Forum Home