Get Zip Code automatically from address in Google Sheets

Get Zip Code automatically from address in Google Sheets

Use Case Scenario:
Our Google Sheet contains hundreds of addresses without ZIP code and we would like to get the zip code for all of the addresses automatically.


Our tutorial on “How to Get Zip Code Automatically from Address” is just what you need! This guide will walk you through the simple steps to set up a function that automatically populates a column with ZIP codes based on address data. Whether you’re managing a customer database or organizing a mailing list, this tutorial will save you time and ensure accuracy in your work. Dive into the world of efficient data handling with our easy-to-follow tutorial!

function getzip(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
}

 =getzip(A2)

Leave a Reply

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