My company is trying to clean up its customer master file. Currently our business has two brands. Some customers buy brand A, some buy brand B, and some customers buy both brands. We used to be seperate companies with alot of overlap in who our customers were. When we first merged we assigned customers number based on which brand was purchased. For example brand A customer #'s started with 1 and brand B customer #'s started with 2. When a customer purchased both brands they had two account numbers. Brand A and B products couldn't ship together so they needed to be ordered seperately which was the reason for 2 account numbers.
Now we can ship A & B products together and need to consolidate customer #'s so customers only need one account number per order rather than submitting purchase order 1 for brand A and purchase order 2 for brand B.
I thought it would be an easy task since you could use a pivot table to consolidate the data and use common fields like address, city, and state to see which customers had 2 account #'s. The problem is when customer service entered addresses they did not stick to a common format. Things like street are entered in various different ways (ie, Street or St. or St) Pivot tables of course do not consolidate non-like things.
What kind of macro can I create that would look at the end of the address field and change all of the abbreviations into the full word? Naturally there is more than just street (ie road, avenue, blvd., etc). I have attached an example file to show what I am working with. I can't do a simple find and replace because 'st' shows up in other parts of the address and doing find 'st' replace with 'street' would mess up the rest of the address. I have about 10 thousand lines of data in my real file and thus can't do it manually.
Customer name is another issue as to how it has been typed in but I'm going to work on fixing the addresses first.
Bookmarks