Trimming/Truncating Text Field in Excel

  • Thread starter Thread starter billbrandi
  • Start date Start date
B

billbrandi

I have a file with 3 text columns that I am using as a mailing list. I want
to remove the leading 5 characters from each text field and the trailing 10
characters from the same fields. How would I do this?
 
Try this:
A1 = 12345xxx1234567890

=MID(LEFT(A1,LEN(A1)-10),6,255)

returns xxx

Another way...

=REPLACE(REPLACE(A1,LEN(A1)-9,10,""),1,5,"")

It is Saturday and things are slow... I was bored.<g>

Rick
 
Try this:
A1 = 12345xxx1234567890

=MID(LEFT(A1,LEN(A1)-10),6,255)

returns xxx

In thinking about it a little more, this is probably the more efficient way
to use the MID function to do what the OP asked for...

=MID(A1,6,LEN(A1)-15)

Rick
 

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