Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 12
Default Seperate Text and numbers in Post code

Hi
I have a data sheet and need to get just the area from a post code e.g BS1
1JN I need just the BS in a column. I would use left,2 etc but problem is
some codes such as Birmingham only have 1 letter.

Any ideas please.
Thanks
Chris
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 258
Default Seperate Text and numbers in Post code

Chriso --

What does Birmingham's code look like?

"chriso" wrote:

Hi
I have a data sheet and need to get just the area from a post code e.g BS1
1JN I need just the BS in a column. I would use left,2 etc but problem is
some codes such as Birmingham only have 1 letter.

Any ideas please.
Thanks
Chris

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Seperate Text and numbers in Post code

I think the maximum is two letters at the beginning of a postcode, so
you could do this:

=IF(AND(MID(A1,2,1)="0",MID(A1,2,1)<="9"),LEFT(A1 ,1),LEFT(A1,2))

assuming the postcode is in A1.

Hope this helps.

Pete


On Apr 7, 7:19*pm, chriso wrote:
Hi
I have a data sheet and need to get just the area from a post code e.g BS1
1JN I need just the BS in a column. *I would use left,2 etc but problem is
some codes such as Birmingham only have 1 letter.

Any ideas please.
Thanks
Chris


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Seperate Text and numbers in Post code

It is "B", as in B15 3SX (where I used to live).

Pete

On Apr 7, 7:25*pm, pdberger
wrote:
Chriso --

What does Birmingham's code look like?



"chriso" wrote:
Hi
I have a data sheet and need to get just the area from a post code e.g BS1
1JN I need just the BS in a column. *I would use left,2 etc but problem is
some codes such as Birmingham only have 1 letter.


Any ideas please.
Thanks
Chris- Hide quoted text -


- Show quoted text -


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 12
Default Seperate Text and numbers in Post code

Hi it would be B43 5JJ for instance

"pdberger" wrote:

Chriso --

What does Birmingham's code look like?

"chriso" wrote:

Hi
I have a data sheet and need to get just the area from a post code e.g BS1
1JN I need just the BS in a column. I would use left,2 etc but problem is
some codes such as Birmingham only have 1 letter.

Any ideas please.
Thanks
Chris



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 12
Default Seperate Text and numbers in Post code

Thats brilliant Pete, thanks very much it works great!

"Pete_UK" wrote:

I think the maximum is two letters at the beginning of a postcode, so
you could do this:

=IF(AND(MID(A1,2,1)="0",MID(A1,2,1)<="9"),LEFT(A1 ,1),LEFT(A1,2))

assuming the postcode is in A1.

Hope this helps.

Pete


On Apr 7, 7:19 pm, chriso wrote:
Hi
I have a data sheet and need to get just the area from a post code e.g BS1
1JN I need just the BS in a column. I would use left,2 etc but problem is
some codes such as Birmingham only have 1 letter.

Any ideas please.
Thanks
Chris



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Seperate Text and numbers in Post code

Here is another possibility...

=LEFT(A1,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A1&"012345 6789"))-1)

Rick


"chriso" wrote in message
...
Hi
I have a data sheet and need to get just the area from a post code e.g BS1
1JN I need just the BS in a column. I would use left,2 etc but problem is
some codes such as Birmingham only have 1 letter.

Any ideas please.
Thanks
Chris


  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Seperate Text and numbers in Post code

You're welcome - thanks for feeding back.

Pete

On Apr 7, 7:45*pm, chriso wrote:
Thats brilliant Pete, thanks very much it works great!



"Pete_UK" wrote:
I think the maximum is two letters at the beginning of a postcode, so
you could do this:


=IF(AND(MID(A1,2,1)="0",MID(A1,2,1)<="9"),LEFT(A1 ,1),LEFT(A1,2))


assuming the postcode is in A1.


Hope this helps.


Pete


On Apr 7, 7:19 pm, chriso wrote:
Hi
I have a data sheet and need to get just the area from a post code e.g BS1
1JN I need just the BS in a column. *I would use left,2 etc but problem is
some codes such as Birmingham only have 1 letter.


Any ideas please.
Thanks
Chris- Hide quoted text -


- Show quoted text -


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
How can I seperate numbers from text (in one cell) into 2 cells? LinLin Excel Discussion (Misc queries) 2 February 14th 08 10:14 PM
Post Code Adam Excel Worksheet Functions 2 September 6th 07 04:12 PM
Does anyone know how I can seperate a post code in my data sheet? gsmcellular Excel Discussion (Misc queries) 3 July 8th 06 01:32 PM
Post Code search Porirua New Users to Excel 6 June 23rd 05 12:27 AM
Post code & Suburbs varun Excel Discussion (Misc queries) 1 June 2nd 05 04:21 AM


All times are GMT +1. The time now is 11:38 AM.

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"