Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Helen
 
Posts: n/a
Default Deleting 3 Text characters from the right

Anyone know how to trim a postcode of variable length, sometimes 5, 6 or 7
characters in length to remove the last 3 characters on the right hand side
of the cell? The postcode is displayed with any gaps or marks and the
separator will varying but it is always the last 3 characters that are
superfluous.
--
Thanks
  #2   Report Post  
 
Posts: n/a
Default

Hi

Try this:
=LEFT(A1,LEN(TRIM(A1))-3)

--
Andy.


"Helen" wrote in message
...
Anyone know how to trim a postcode of variable length, sometimes 5, 6 or 7
characters in length to remove the last 3 characters on the right hand
side
of the cell? The postcode is displayed with any gaps or marks and the
separator will varying but it is always the last 3 characters that are
superfluous.
--
Thanks



  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default

=left(A1,FIND(" ",A1)-1)

is more resilient as I understand some postcodes only have a trailing 2.

--
HTH

Bob Phillips

"Helen" wrote in message
...
Anyone know how to trim a postcode of variable length, sometimes 5, 6 or 7
characters in length to remove the last 3 characters on the right hand

side
of the cell? The postcode is displayed with any gaps or marks and the
separator will varying but it is always the last 3 characters that are
superfluous.
--
Thanks



  #4   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

Helen,

For a code in cell A1

=LEFT(A1,LEN(A1)-3)

HTH,
Bernie
MS Excel MVP


"Helen" wrote in message
...
Anyone know how to trim a postcode of variable length, sometimes 5, 6 or 7
characters in length to remove the last 3 characters on the right hand

side
of the cell? The postcode is displayed with any gaps or marks and the
separator will varying but it is always the last 3 characters that are
superfluous.
--
Thanks



  #5   Report Post  
Duke Carey
 
Posts: n/a
Default

try

=LEFT(A1,LEN(A1)-3)

To be sure that you don't get fouled up by leading and trailing spaces, you
can use

=LEFT(TRIM(A1),LEN(TRIM(A1))-3)


"Helen" wrote:

Anyone know how to trim a postcode of variable length, sometimes 5, 6 or 7
characters in length to remove the last 3 characters on the right hand side
of the cell? The postcode is displayed with any gaps or marks and the
separator will varying but it is always the last 3 characters that are
superfluous.
--
Thanks



  #7   Report Post  
bj
 
Posts: n/a
Default

try
=left(A1,len(A1)-3)

"Helen" wrote:

Anyone know how to trim a postcode of variable length, sometimes 5, 6 or 7
characters in length to remove the last 3 characters on the right hand side
of the cell? The postcode is displayed with any gaps or marks and the
separator will varying but it is always the last 3 characters that are
superfluous.
--
Thanks

  #8   Report Post  
ww
 
Posts: n/a
Default

=LEFT(A1,(LEN(A1)-3))
should work

"Helen" wrote:

Anyone know how to trim a postcode of variable length, sometimes 5, 6 or 7
characters in length to remove the last 3 characters on the right hand side
of the cell? The postcode is displayed with any gaps or marks and the
separator will varying but it is always the last 3 characters that are
superfluous.
--
Thanks

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
want to remove all text characters equal to one character in length from text string [email protected] Excel Worksheet Functions 1 April 18th 05 09:56 PM
want to remove all text characters equal to one character in length from text string [email protected] Excel Worksheet Functions 1 April 18th 05 12:25 AM
Importing text files with mathematical characters The Beckster Excel Discussion (Misc queries) 1 March 2nd 05 12:56 PM
Remove single text characters mawme Excel Discussion (Misc queries) 1 January 27th 05 10:25 PM
How do I get rid of line feed characters in wrapped text? Gladmac Excel Discussion (Misc queries) 3 January 18th 05 06:40 PM


All times are GMT +1. The time now is 04:48 PM.

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

About Us

"It's about Microsoft Excel"