Playback starts YouTube’s embedded player (privacy-enhanced mode).
How to populate a column with ZIP codes based on addresses in Google Sheets
ChannelGeography RealmDescription from the creator
If you have a field containing address information, you can set up a simple function in Google Sheets to be able to populate a separate column with ZIP code data.
Copy and paste code:
function geo2zip(a) {
var response=Maps.newGeocoder()
.reverseGeocode(lat(a),long(a));
return response.results[0].formatted_address.split(',')[2].trim().split(' ')[1];
}
function lat(pointa) {
var response = Maps.newGeocoder()
.geocode(pointa);
return response.results[0].geometry.location.lat
}
function long(pointa) {
var response = Maps.newGeocoder()
.geocode(pointa);
return response.results[0].geometry.location.lng
}
Paste this function in the Google Sheets cell and enter the cell number that contains the first address record in the parenthesis (e.g. =geo2zip(B2)):
=geo2zip()
More:
How to Populate a Cell with the ZIP Code Based on an Address in Google Sheets
gislounge.com/populate-cell-zip-code-based-addr…
Music:
Morning Walk by Unicorn Heads, CC BY 2.0
Copy and paste code:
function geo2zip(a) {
var response=Maps.newGeocoder()
.reverseGeocode(lat(a),long(a));
return response.results[0].formatted_address.split(',')[2].trim().split(' ')[1];
}
function lat(pointa) {
var response = Maps.newGeocoder()
.geocode(pointa);
return response.results[0].geometry.location.lat
}
function long(pointa) {
var response = Maps.newGeocoder()
.geocode(pointa);
return response.results[0].geometry.location.lng
}
Paste this function in the Google Sheets cell and enter the cell number that contains the first address record in the parenthesis (e.g. =geo2zip(B2)):
=geo2zip()
More:
How to Populate a Cell with the ZIP Code Based on an Address in Google Sheets
gislounge.com/populate-cell-zip-code-based-addr…
Music:
Morning Walk by Unicorn Heads, CC BY 2.0
About this tutorial
Geography Realm published this 2:41 video tutorial on October 27, 2018. It has been watched 53,404 times on YouTube.
- Channel
- Geography Realm
- Category
- Science & Technology
- Duration
- 2:41
- Published
- October 27, 2018
- Views
- 53,404
- Likes
- 237
Tags
Share
This tutorial in other languages
- FRComment remplir une colonne avec ZIP codes en fonction des adresses dans Google Sheets
- ESCómo llenar una columna con los códigos postales en base a las direcciones de cálculo de Google
- PTComo preencher uma coluna com ZIP códigos com base em endereços em planilhas do Google
- ITCome popolare una colonna con avviamento postale codici in base agli indirizzi in Fogli Google
- DEWie eine Spalte mit Postleitzahlen füllen basierend auf Adressen in Google Sheets
- NLHoe maak je een kolom met ZIP-codes op basis van adressen in Google Sheets bevolken
- RUКак заполнить столбец с ZIP кодов, основываясь на адреса в Google Таблицах
- PLJak wypełnić kolumnę z zamkiem kodów w oparciu o adresy w arkuszach Google
- JAGoogleシート内のアドレスに基づいて郵便番号と列を移入する方法
- ARكيفية تعبئة عمود مع ZIP رموز استنادا إلى عناوين في صفائح جوجل
- HIGoogle पत्रक में पतों के आधार पर ज़िप कोड के साथ एक कॉलम को भरने के लिए कैसे
- IDCara mengisi kolom dengan ZIP kode berdasarkan alamat di Google Sheets