{"id":25934415,"url":"https://github.com/sanand0/geocode-excel","last_synced_at":"2026-01-26T18:55:55.271Z","repository":{"id":74426298,"uuid":"9932661","full_name":"sanand0/geocode-excel","owner":"sanand0","description":"Convert addresses to lat-longs (and vice versa) in Excel","archived":false,"fork":false,"pushed_at":"2024-12-25T11:47:13.000Z","size":275,"stargazers_count":53,"open_issues_count":2,"forks_count":23,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-10-06T10:59:58.686Z","etag":null,"topics":["excel","tool"],"latest_commit_sha":null,"homepage":"","language":"VBA","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sanand0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-05-08T09:13:41.000Z","updated_at":"2025-08-29T20:46:58.000Z","dependencies_parsed_at":"2024-12-25T12:27:35.469Z","dependency_job_id":"83dc8459-c513-482a-a522-aa0d42ff6dc1","html_url":"https://github.com/sanand0/geocode-excel","commit_stats":null,"previous_names":["sanand0/geocode-excel","gramener/geocode-excel"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sanand0/geocode-excel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanand0%2Fgeocode-excel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanand0%2Fgeocode-excel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanand0%2Fgeocode-excel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanand0%2Fgeocode-excel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sanand0","download_url":"https://codeload.github.com/sanand0/geocode-excel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanand0%2Fgeocode-excel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28785172,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T13:55:28.044Z","status":"ssl_error","status_checked_at":"2026-01-26T13:55:26.068Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["excel","tool"],"created_at":"2025-03-04T00:57:45.214Z","updated_at":"2026-01-26T18:55:55.232Z","avatar_url":"https://github.com/sanand0.png","language":"VBA","funding_links":[],"categories":[],"sub_categories":[],"readme":"[Download Geocode.xlsm](../../raw/master/Geocode.xlsm).\n\nThis is an Excel file (with a Visual Basic macro function) that converts addresses to latitudes and longitudes (geocoding), and latitude-longitudes to addresses (reverse geocoding). This works through public geocoding APIs.\n\n## Requirements\n\n- It has been tested on Office 2017 and Office 365 on Windows.\n- It requires Excel 2013 or above (for the [WorksheetFunction.EncodeURL](https://docs.microsoft.com/en-us/office/vba/api/excel.worksheetfunction.encodeurl) method)\n- It only works on Windows. The `MSXML2` reference we use to access the APIs is not available on Mac.\n\n## Nominatim Geocoding functions\n\nThe Nominatim API uses OpenStreetMap, which is not as comprehensive as Google's but is free. See:\n\u003chttps://nominatim.org/release-docs/develop/\u003e\n\n`=NominatimGeocode(address)` Converts a string address (e.g. \"10 Downing Street\" or \"Tokyo, Japan\") into a \"latitude,longitude\" string\n`=NominatimReverseGeocode(lat, lng)` Converts a latitude and longitude into an address\n\n![NominatimGeocode usage](docs/usage.gif)\n\n## Google Geocoding functions\n\nThe Google Geocoding API is comprehensive, but requires an API key. See:\n\u003chttps://developers.google.com/maps/documentation/geocoding/get-api-key\u003e\n\n- `=GoogleGeocode(address, api_key)` Converts a string address (e.g. \"10 Downing Street\" or \"Tokyo, Japan\") into a \"latitude,longitude\" string\n- `=GoogleReverseGeocode(lat, lng, api_key)` Converts a latitude and longitude into an address\n\nThe usage is otherwise identical to the Nominatim functions.\n\n# Tutorial\n\nTo get started, download and open [Geocode.xlsm](https://github.com/sanand0/geocode-excel/raw/master/Geocode.xlsm).\n\nIf you see a security warning, click on \"Enable Content\".\n\n![Excel security warning](docs/excel-security-warning.png)\n\nIn any cell, type in the formula `=NominatimGeocode(\"10 Downing Street, London\")` in any cell. After a second, it shows the result as `51.50344025,-0.127708209585621` — which is the `\u003clatitude\u003e,\u003clongitude\u003e` combination. Here's a live example:\n\n![Example of geocoding](docs/usage.gif)\n\n## Geocode an address\n\nVisit the [list of the largest cities](https://en.wikipedia.org/wiki/List_of_largest_cities) and copy the table, along with its population into Excel.\n\n![Addresses](docs/addresses.png)\n\nIf all the city names are in column A, you can create a new column with the formula `=NominatimGeocode(A2)` (replacing `A2` with the actual cell reference).\n\n![Geocoding formula](docs/geocode-formula.png)\n\nHere, we use `A2\u0026\", \"\u0026B2` to concatenate the city and nation. The first cell will look up “Chongqing, China”. When you press Enter, the result is:\n\n![Geocoding result](docs/geocode-result.png)\n\n## Geocode multiple addresses\n\nCopy the formula into the entire column.\n\n![Result of copy-pasting the formula](docs/copy-paste-geocode.png)\n\nAutomatic calculations are disabled to reduce the number of API requests. So, if you copy-paste or drag a formula, the formula is not rerun. The values are copied as-is.\n\nInstead, select a _small_ group of cells and press `Ctrl-Q` to run the RefreshSelected macro. (Each lookup takes 0.5 - 1 seconds. Select batches of 10-20 cells at a time.)\n\nOnce you finish geocoding, replace the formulas with the values. Otherwise, Excel will re-run _the entire geocoding_ every time you save, open, or refresh the file. To do this, copy the geocoded cells (`Ctrl-C`) and Paste Special \u003e Values (`Alt-H-V-S-V`).\n\n![Excel Paste Special menu](docs/excel-paste-special.png)\n\nThis geocodes the selected cell range. Geocoded cells turn blue. But if there’s an error, these cells turn red.\n\nErrors occur if the location contains special characters (e.g. the “ã” in São Paulo). In such cases, re-write the location in ASCII, i.e. without special characters (e.g. Sau Paulo.)\n\n![Geocoding error example](docs/geocode-error.png)\n\n## Split columns\n\nTo convert this single column with `\u003clatitude\u003e,\u003clongitude\u003e` into one column each, you can use Data \u003e [Text to Columns](https://support.office.com/en-us/article/Split-text-into-different-columns-with-the-Convert-Text-to-Columns-Wizard-30B14928-5550-41F5-97CA-7A3E9C363ED7), and split the column using comma `,` as the separator.\n\n![Excel Text to Columns menu](docs/excel-text-to-columns.png)\n\nThe result is an Excel sheet with 2 columns: Latitude and Longitude.\n\n![Geocoded latitude-longitude columns](docs/geocode-lat-long.png)\n\n## Exercises\n\n1. Geocode the [airport locations in the UK](https://en.wikipedia.org/wiki/List_of_airports_in_the_United_Kingdom_and_the_British_Crown_Dependencies)\n2. Geocode the [post office locations in Singapore](https://www.singpost.com/list-of-post-offices)\n\n## Google Sheets alternatives\n\nIf you prefer using Google's Geocoders on Google Sheets, use:\n\n- [Geocoding Sheet](https://docs.google.com/spreadsheets/d/12CYzTYXbRqCBEXa8no1eIbYPEOxRZlLaZVgMZahO07k/edit#gid=0) by [Christos Sameras](https://myengineeringworld.net/2018/08/geocoding-reverse-gas.html). Copy it and use it.\n- [Geocoding Marketplace App](https://workspace.google.com/marketplace/app/geocoding_by_smartmonkey/1033231575312). [Install it to use in Google Sheets](https://handsondataviz.org/geocode.html)\n- [Geocoding Macro](https://github.com/nuket/google-sheets-geocoding-macro) by [Max Vilimpoc](https://vilimpoc.org/blog/2013/07/11/google-spreadsheet-geocoding-macro/). Add it to your Google Sheet.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanand0%2Fgeocode-excel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsanand0%2Fgeocode-excel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanand0%2Fgeocode-excel/lists"}