Removing spaces in text

  • Thread starter Thread starter Jeff Granger
  • Start date Start date
J

Jeff Granger

I need to create an 8 letter Account Name from company names, and I need to
remove any spaces in the company name, such that Smith And Wesson Ltd gives
SMITHAND.

Any suggestions?

Jeff
 
Hi Jeff,

=UPPER(LEFT(SUBSTITUTE(A1," ",""),8))

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

|I need to create an 8 letter Account Name from company names, and I need to
| remove any spaces in the company name, such that Smith And Wesson Ltd gives
| SMITHAND.
|
| Any suggestions?
|
| Jeff
|
|
 
Jeff Granger said:
I need to create an 8 letter Account Name from company names, and I
need to remove any spaces in the company name, such that Smith And
Wesson Ltd gives SMITHAND.

You'd be far better off assigning arbitrary distinct 8-digit numbers
as account IDs rather than using the first 8 nonspace characters. How
would you distinguish between Smith and Wesson and Smith and Hawken?

Trying to condense a name field into an ID field is a classic database
mistake. You've been warned.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top