Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
I have some postal codes all in one column.
eg EN1 7IH, and N1 M33 I want to create a column where excel reads the first characters BEFORE the space, since those characters represent an Area. I want to be able to add the name of the postal code area in the new column. For example EN1 = Area1 and N1 = Area2 Last edited by idxearo : October 25th 12 at 04:57 AM |
#2
![]() |
|||
|
|||
![]()
You will need to have a table set up in your work sheet with the post codes listed and a area allocated to each code, As in the UK there are over a hundred. Then you could use a LOOKUP or INDEX & MATCH etc.
EG: =VLOOKUP(LEFT(Cell/Ref,2),Your_Range,Column,0) Quote:
|
#3
![]() |
|||
|
|||
![]() Quote:
|
#4
![]() |
|||
|
|||
![]()
The formula suggested above will only look up the left 2 characters in the post code cells. That means it will look for EN in the lookup table rather than EN1.
The below will look for all characters before the first space. =VLOOKUP(LEFT(CellRef,FIND(" ",CellRef)-1),Range,Column,0) |
#5
![]() |
|||
|
|||
![]()
EG = "EXAMPLE" !!
Quote:
|
#6
![]() |
|||
|
|||
![]() Yes, Kevin, I know what it means. But your EG was not going to do what the OP needed, so I stepped in with a better EG. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Verify Canadian Postal Code ~ make the code work | Excel Programming | |||
Cdn Postal Code | Excel Discussion (Misc queries) | |||
Canadian Postal Code format? | Excel Worksheet Functions | |||
Validation of Postal Code | Excel Worksheet Functions | |||
Canadian Postal Code | Excel Programming |