Replacing cells based on match of first letters

djfreex

New Member
Joined
Aug 8, 2008
Messages
11
I have a long list of customer names in a excel sheet. However, creator didnt use validation and names are entered without structure. Example:

Test & Son Co
Test & Son Co.
Test&Son Company
Test Son Comp
...

I want to be able to take the first name found and match it to first x letters of other entries and if first x letters match, it should replace the one of names to all the other cells.

Is this possible?
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Hi,

Welcome to MrExcel.

This probably isn't the best solution for you, but it has bumped you back up if nothing else.

If you can add another column then try something like this....

Excel Workbook
AB
1NameSolution
2Test & Son CoTest & Son Co
3Test& Son CoTest & Son Co
4Test&Son CoTest & Son Co
5Test and Son CoTest & Son Co
6Test *Son CoTest & Son Co
7ABCD & Son CoABCD & Son Co
8ABCD & Son CoABCD & Son Co
9ABCD & Son CoABCD & Son Co
10ABCD& Son CoABCD & Son Co
11ABCDSon CoABCD & Son Co
12Your CompanyYour Company
13Your- CompanyYour Company
14Your * CompanyYour Company
15Your/CompanyYour Company
16YourCompanyYour Company
Sheet1



The formula in B3 needs to be copied down.
You can then highlight column B Copy and Paste Special Values only to column A.

This formula will fail if you have different companies that have the same first x letters....


Excel Workbook
AB
1NameSolution
2Test & Son CoTest & Son Co
3Test& Son CoTest & Son Co
4Test&Son CoTest & Son Co
5Test and Son CoTest & Son Co
6Test *Son CoTest & Son Co
7ABC & Son CoABC & Son Co
8ABC &Son CoABC & Son Co
9ABCD & Son CoABC & Son Co
10ABCD& Son CoABC & Son Co
11ABCDSon CoABC & Son Co
12Your CompanyYour Company
13Your- CompanyYour Company
14Your * CompanyYour Company
15Your/CompanyYour Company
16YourCompanyYour Company
Sheet1



I have highlighted the original company name and you can see that the formula fails with company ABCD.

I hope this helps or at least gets you some other replies.

Good luck.

Ak
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,749
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top