Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel Function to Replace Substring

Tags:

excel

I need to replace the values in cells that may contain certain values. Lets say I have the following values listed in the A column.

Trucking Inc.
New Truck Inc
ABV Trucking Inc, LLC

I want to be able to replace the following with a corresponding value. The following is a list contains in 2 columns. 1 Column is the From and the other is the To field.

      From      To
      " Inc."   ""
      " Inc"    ""
      " Inc, "  ""
      " LLC"    ""

The result should be:

Trucking
New Truck
ABV Trucking

Hope I am making sense here.

like image 938
Michael W Avatar asked Dec 20 '22 17:12

Michael W


1 Answers

I'm making the same assumptions as Scott Holtzman - you probably want to use the SUBSITUTE function.

Example:

=SUBSTITUTE(A2,B2,C2)

This is the situation I am assuming for you:

Your Situation I Think

Just as an asside(lol pun): You should learn how to take screen shots and then edit them with MS paint - that will get alot more questions answered correctly for you (just for future reference):

like image 74
Stepan1010 Avatar answered Jan 06 '23 07:01

Stepan1010