Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 26
Default Trimming/Truncating Text Field in Excel

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?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Trimming/Truncating Text Field in Excel

Try this:

A1 = 12345xxx1234567890

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

returns xxx

--
Biff
Microsoft Excel MVP


"billbrandi" wrote in message
...
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?



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Trimming/Truncating Text Field in Excel

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
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Trimming/Truncating Text Field in Excel

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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Truncating text field in column Anne Excel Discussion (Misc queries) 2 October 18th 07 10:28 PM
EXCEL: Truncating Text Fields to allow Vlookup searches to find da burkeam1113 Excel Worksheet Functions 1 August 21st 07 03:02 AM
Trimming text scott Excel Worksheet Functions 4 December 16th 06 04:49 PM
Text to Columns in excel for delimited files - allow trimming opt. D. Young New Users to Excel 1 April 25th 05 05:06 PM
15 character field truncating Carla Bradley Excel Discussion (Misc queries) 4 December 18th 04 03:49 PM


All times are GMT +1. The time now is 09:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"