Salih
Salih

Reputation: 381

Google sheet : Find-and-replace/remove using formula

I have Col A2 -> Contains Reviews Col B2 -> contains parasite text

The Col C2 should be same as col A2 (Reviews) except that whatever parasite/text in B2 has to be removed from it.

Please look at a sample below.

Col A Col B Col C
The car is good one one The car is good
A proper place to stay stay A proper place to

Is there a forumla that can achieve this functionality ?

Upvotes: 0

Views: 276

Answers (1)

Irene Liberali
Irene Liberali

Reputation: 401

=REPLACE(A2,FIND(B2,A2),LEN(B2),"")
  • FIND gives you the starting position of the parasite string in Col A.
  • LEN gives you the length of the parasite string
  • REPLACE removes from Col A the parasite string and replaces it with an empty string

Please note that this will not trim whitespace characters (e.g. there is an extra space at the end of Col C).

Upvotes: 1

Related Questions