Geocoding with Excel and VBA

Before one can position an address (a street address or a town itself) on a map, it must be converted to geographic coordinates (latitude and longitude). Then, that latitude and longitude is mapped to a particular location on the map. Figure 1 shows several thousand U.S. cities and towns on a Mercator projection map. Well, it’s actually an Excel XY Scatter chart made to look like a map of the U.S. It plots the crime rate for a specific crime for a specific year but that’s not the focus of this note. Here we focus on geocoding an address using Excel and VBA and plotting the resulting geographic coordinates (latitude and longitude) onto a map.

Figure 1 – This is a XY Scatter chart!

For a version in a page by itself (i.e., not in a scrollable iframe as below) visit

Tushar Mehta


    • Thanks for the lead. Using a ready made database would be faster. However, it is possible it does not have the current location of interest. A solution that uses a database and supplements missing addresses with a webservice might be the way to go.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>