A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Postcode Area extract first alpha letters



 
 
Thread Tools Display Modes
  #1  
Old May 13th, 2009, 12:01 PM posted to microsoft.public.excel.worksheet.functions
aquaxander
external usenet poster
 
Posts: 15
Default Postcode Area extract first alpha letters

Hi,
I have a list of postcodes and would like to have only the first letters,
whether this is 2 or 1 letter.
I have been able to extract the beginning of a postcode with
=LEFT(A1,FIND(" ",A1)-1)
but now want to split it further and just have the letters not the numbers.
Eg:
"B1" return "B"
"SW12" return "SW"
"M23" return "M"
"NN9" return "NN" etc.
is there something that extracts alpha characters?

  #2  
Old May 13th, 2009, 12:24 PM posted to microsoft.public.excel.worksheet.functions
Mike H
external usenet poster
 
Posts: 8,419
Default Postcode Area extract first alpha letters

Hi,

It would have helped to see a full code but I assume these are the first 1
or 2 alpha characters you want to extract. Try this

=SUBSTITUTE(A1,MID(A1,MIN(FIND({0,1,2,3,4,5,6,7,8, 9},A1&"0123456789")),LEN(A1)),"")

Mike

"aquaxander" wrote:

Hi,
I have a list of postcodes and would like to have only the first letters,
whether this is 2 or 1 letter.
I have been able to extract the beginning of a postcode with
=LEFT(A1,FIND(" ",A1)-1)
but now want to split it further and just have the letters not the numbers.
Eg:
"B1" return "B"
"SW12" return "SW"
"M23" return "M"
"NN9" return "NN" etc.
is there something that extracts alpha characters?

  #3  
Old May 13th, 2009, 12:29 PM posted to microsoft.public.excel.worksheet.functions
Ashish Mathur[_2_]
external usenet poster
 
Posts: 1,764
Default Postcode Area extract first alpha letters

Hi,

Try this =LEFT(C14,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},C14&"01 23456789"))-1)

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"aquaxander" wrote in message
...
Hi,
I have a list of postcodes and would like to have only the first letters,
whether this is 2 or 1 letter.
I have been able to extract the beginning of a postcode with
=LEFT(A1,FIND(" ",A1)-1)
but now want to split it further and just have the letters not the
numbers.
Eg:
"B1" return "B"
"SW12" return "SW"
"M23" return "M"
"NN9" return "NN" etc.
is there something that extracts alpha characters?

  #4  
Old May 13th, 2009, 01:49 PM posted to microsoft.public.excel.worksheet.functions
Jacob Skaria
external usenet poster
 
Posts: 5,952
Default Postcode Area extract first alpha letters

Assuming the entries will have only 1 or 2 alphas in front..you can try this

=IF(ISERROR(1*MID(A1,2,1)),LEFT(A1,2),LEFT(A1,1))

If this post helps click Yes
---------------
Jacob Skaria


"aquaxander" wrote:

Hi,
I have a list of postcodes and would like to have only the first letters,
whether this is 2 or 1 letter.
I have been able to extract the beginning of a postcode with
=LEFT(A1,FIND(" ",A1)-1)
but now want to split it further and just have the letters not the numbers.
Eg:
"B1" return "B"
"SW12" return "SW"
"M23" return "M"
"NN9" return "NN" etc.
is there something that extracts alpha characters?

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:45 PM.


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