#1   Report Post  
Posted to microsoft.public.excel.misc
flow23
 
Posts: n/a
Default postcode

I am working with UK postcodes and need to strip out the area and district
automatically

The post code comes in following

A1 2BC
D34 5EF
GH6 7IJ
KL8M 9NQ


The part before the space contains the area and district.

The first is area which can be a single letter or double letter. The second
bit is usually a single number, however in london it can be a number and
letter.


So the results would be as follows.

A
D
GH
KL

How can I extract this automatically?

Many thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
CLR
 
Posts: n/a
Default postcode

Maybe this...........

=IF(ISNUMBER(MID(A1,2,1)*1),LEFT(A1,1),IF(ISNUMBER (MID(A1,3,1)*1),LEFT(A1,2),""))

All on one line, watch out for word-wrap

Vaya con Dios,
Chuck, CABGx3


"flow23" wrote:

I am working with UK postcodes and need to strip out the area and district
automatically

The post code comes in following

A1 2BC
D34 5EF
GH6 7IJ
KL8M 9NQ


The part before the space contains the area and district.

The first is area which can be a single letter or double letter. The second
bit is usually a single number, however in london it can be a number and
letter.


So the results would be as follows.

A
D
GH
KL

How can I extract this automatically?

Many thanks

  #3   Report Post  
Posted to microsoft.public.excel.misc
Cutter
 
Posts: n/a
Default postcode


With your example codes inrange A1:A4

Type this in B1:
=LEFT(A1,1)&IF(ISNUMBER(VALUE(MID(A1,2,1))),"",MID (A1,2,1))

and drag copy down as far as is needed


--
Cutter
------------------------------------------------------------------------
Cutter's Profile: http://www.excelforum.com/member.php...fo&userid=9848
View this thread: http://www.excelforum.com/showthread...hreadid=502494

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
UK Postcode formula KeLee Excel Worksheet Functions 2 November 1st 05 01:16 PM
Converting postcode to sales area LarsF Excel Discussion (Misc queries) 2 August 18th 05 10:12 AM
PING: JulieD & AlfD re Sorting By Postcode Steve Excel Discussion (Misc queries) 1 March 22nd 05 10:41 PM
Sorting by PostCode Steve Excel Discussion (Misc queries) 6 March 22nd 05 12:50 PM
HELP WITH POSTCODE FORMATTING UK EXCEL MAN Excel Worksheet Functions 1 December 27th 04 09:01 AM


All times are GMT +1. The time now is 06:58 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"