I have a string consisting of multiple words which I'd like to break down into separate words by VBA. For example the initial string is an address like "Street 66 123456 LONDON". I need to parse the city, postal code and the street out of that string and put them into separate variables.
The problem is that sometimes the string can be like "Street 66 123456 LONDON (CITY), i.e. the city is not one word but two or more. That's why for the postal code I can't always just find the second word from the right since it is not always the postal code.
I know that:
-the city is always the right-most word or words,
-postal code is always left of city
-street address is everything else and starts always from the left
Is there a foolproof way to parse out these words from the initial string?
The problem is that sometimes the string can be like "Street 66 123456 LONDON (CITY), i.e. the city is not one word but two or more. That's why for the postal code I can't always just find the second word from the right since it is not always the postal code.
I know that:
-the city is always the right-most word or words,
-postal code is always left of city
-street address is everything else and starts always from the left
Is there a foolproof way to parse out these words from the initial string?