Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
How to extract zip code from a 1 cell adress line?
Hi, I have been trying to extract zipcodes from a long 1 cell adress line,
but have yet to find the right way to do it, because the adresses are of variable length. The adresses are usually look like this: Adress Number, Zipcode Cityname I know that I somehow have to extract the last section of the cell, from the second space from the right, but I have no idea of how to do it, can someone please help? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
How to extract zip code from a 1 cell adress line?
Is the zip always proceeded by a comma? If so then Mid(cell,
find(",",cell)+2,5) assuming that your zip code is 5 digits long. This finds the incidence of the first comma in your cell, then adds two positions and gets the next 5 characters. "Tippo22" wrote: Hi, I have been trying to extract zipcodes from a long 1 cell adress line, but have yet to find the right way to do it, because the adresses are of variable length. The adresses are usually look like this: Adress Number, Zipcode Cityname I know that I somehow have to extract the last section of the cell, from the second space from the right, but I have no idea of how to do it, can someone please help? |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
How to extract zip code from a 1 cell adress line?
Thanks a lot, but what if there is two comma's in the adress? Is it possible
to find the first comma from the right, and then extract the zip from there? "ASA" wrote: Is the zip always proceeded by a comma? If so then Mid(cell, find(",",cell)+2,5) assuming that your zip code is 5 digits long. This finds the incidence of the first comma in your cell, then adds two positions and gets the next 5 characters. "Tippo22" wrote: Hi, I have been trying to extract zipcodes from a long 1 cell adress line, but have yet to find the right way to do it, because the adresses are of variable length. The adresses are usually look like this: Adress Number, Zipcode Cityname I know that I somehow have to extract the last section of the cell, from the second space from the right, but I have no idea of how to do it, can someone please help? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
New Line Code for Cell Format | Excel Discussion (Misc queries) | |||
Excel Formula for Single Cell Adress | Excel Worksheet Functions | |||
Return cell adress for next non-blank cell in a range | Excel Worksheet Functions | |||
How do I put an adress in a cell in multiple lines?? | Excel Discussion (Misc queries) | |||
Is it possible to use a cell adress that is typed in a cell? | Excel Worksheet Functions |