Hi All,
Excel 2007
I'm looking to extract parts of an address into different columns, I've already extract the Country, Post Code & Town. But what i'm having trouble doing is extract the street address and county, the reason I'm having trouble is because not every address has a county.
Below is what I have so far:
I need to extract Street (which is in red) into the Street Column
County (which is highthlighted in dark blue) into county
Excel 2010
<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: center"]2[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: center"]3[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: center"]4[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: center"]5[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: center"]6[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: center"]7[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
</tbody>
[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: #DAE7F5"]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]D2[/TH]
[TD="align: left"]=TRIM(RIGHT(SUBSTITUTE(TRIM(SUBSTITUTE(SUBSTITUTE(A2,F2,""),E2,""))," ",REPT(" ",99)),99))[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]E2[/TH]
[TD="align: left"]=TRIM(RIGHT(SUBSTITUTE(SUBSTITUTE(A2," "&F2,"")," ",REPT(" ",99)),115))[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]F2[/TH]
[TD="align: left"]=RIGHT(A2,14)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
Thanks in advance for our help
Excel 2007
I'm looking to extract parts of an address into different columns, I've already extract the Country, Post Code & Town. But what i'm having trouble doing is extract the street address and county, the reason I'm having trouble is because not every address has a county.
Below is what I have so far:
I need to extract Street (which is in red) into the Street Column
County (which is highthlighted in dark blue) into county
Excel 2010
A | B | C | D | E | F | |
---|---|---|---|---|---|---|
Address1 | Street | County | Town | Post Code | Country | |
123 Bridge Street Kent KA4 1AA UNITED KINGDOM | Kent | KA4 1AA | UNITED KINGDOM | |||
Bridge Street Kent KA4 1AA UNITED KINGDOM | Kent | KA4 1AA | UNITED KINGDOM | |||
1 Random Road Edinburgh EH12 9AA UNITED KINGDOM | Edinburgh | EH12 9AA | UNITED KINGDOM | |||
East Avenue Maidstone Kent K1 1AA UNITED KINGDOM | Kent | K1 1AA | UNITED KINGDOM | |||
19 Random London S1 1AA UNITED KINGDOM | London | S1 1AA | UNITED KINGDOM | |||
178 East Wellingotn St Mid-Lothian Edinburgh EH1 1AA UNITED KINGDOM | Edinburgh | EH1 1AA | UNITED KINGDOM |
<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: center"]2[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: center"]3[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: center"]4[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: center"]5[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: center"]6[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: center"]7[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
</tbody>
Sheet1
[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: #DAE7F5"]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]D2[/TH]
[TD="align: left"]=TRIM(RIGHT(SUBSTITUTE(TRIM(SUBSTITUTE(SUBSTITUTE(A2,F2,""),E2,""))," ",REPT(" ",99)),99))[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]E2[/TH]
[TD="align: left"]=TRIM(RIGHT(SUBSTITUTE(SUBSTITUTE(A2," "&F2,"")," ",REPT(" ",99)),115))[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]F2[/TH]
[TD="align: left"]=RIGHT(A2,14)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
Thanks in advance for our help