![]() |
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 |
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 |
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 |
All times are GMT +1. The time now is 10:29 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com