Hello.
I've got this problem at work. I'm fairly certain that it is solvable by using VBA, and I have indeed started learning VBA. However, I realise that there's a long way before I can solve this particular problem by myself, so I hope some of you guys can help.
I've got a table of nearly 20.000 street addresses that i want to put on a map. As long as the adresses that I've got in my table follow the official spelling for that address, I know exactly how to georeference it.
The trouble is that many of the "addresses" in my list is not a single address, but a collective term for several addresses, so i need to clean this up.
The norwegian street address system is as follows: Street name - house number - (house letter) , for example "Storgata 41 a" or "Lilleveien 7".
This is what I've got:
What I want is a macro that recognises a hyphen , and inserts rows that contain the street name and house number for every other number in the case of "Storgata 5-9". In the case of "Lilleveien 6 a-f" it should insert rows containing the street name, house number and house letter for all of the six letters a, b, c, d, e, f.
This is what I want:
I would appreciate any help on this.
Thanks in advance!
I've got this problem at work. I'm fairly certain that it is solvable by using VBA, and I have indeed started learning VBA. However, I realise that there's a long way before I can solve this particular problem by myself, so I hope some of you guys can help.
I've got a table of nearly 20.000 street addresses that i want to put on a map. As long as the adresses that I've got in my table follow the official spelling for that address, I know exactly how to georeference it.
The trouble is that many of the "addresses" in my list is not a single address, but a collective term for several addresses, so i need to clean this up.
The norwegian street address system is as follows: Street name - house number - (house letter) , for example "Storgata 41 a" or "Lilleveien 7".
This is what I've got:
Storgata 2 | OK |
Storgata 3 b | OK |
Lilleveien 4 f | OK |
Storgata 5-9 | Should be three different rows - Storgata 5, Storgata 7, Storgata 9 (every other number, as odd numbers are on one side of the street, while even numbers are on the other side) |
Lilleveien 6 a-f | Should be six different rows - Lilleveien 6 a, Lilleveien 6 b, Lilleveien 6 c |
What I want is a macro that recognises a hyphen , and inserts rows that contain the street name and house number for every other number in the case of "Storgata 5-9". In the case of "Lilleveien 6 a-f" it should insert rows containing the street name, house number and house letter for all of the six letters a, b, c, d, e, f.
This is what I want:
Storgata 2 |
Storgata 3 b |
Lilleveien 4 f |
Storgata 5 |
Storgata 7 |
Storgata 9 |
Lilleveien 6 a |
Lilleveien 6 b |
Lilleveien 6 c |
Lilleveien 6 d |
Lilleveien 6 e |
Lilleveien 6 f |
I would appreciate any help on this.
Thanks in advance!