Forum Message

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

I'm surprised that Replace doesn't work.  Why not use basic Excel formula to edit the text.

Assuming text is in A1, A2 etc In adjacents columns do something like this.
In C1 =LEN(A1)
In D1 =LEFT(A1,7)
In E1 =IF(D1="Peanuts",MID(A1,9,C1-7),A1)

Select and drag C1..E1 for all of the rows, and then Copy and Paste values the results in Column E, back over the original text in Column A.

Then do again,

In D1 =LEFT(A1,9)
In E1 =IF(D1="Butternut",MID(A1,11,C1-9),A1)

There may be a quicker way, but I think this would do the job.


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