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)
Getzip

Loading

2 thoughts on “Get Zip Code automatically from address in Google Sheets

  1. Thanks , I’ve recently been looking for information about this subject for ages and yours is the
    greatest I have found out till now. But, what concerning the
    conclusion? Are you certain concerning the source?

    My site … nordvpn Coupons inspiresensation (http://ur.link)

  2. 350fairfax nordvpn cashback
    Hi there just wanted to give you a quick heads up.
    The words in your article seem to be running off the screen in Safari.
    I’m not sure if this is a formatting issue or something to do
    with internet browser compatibility but I thought I’d post
    to let you know. The layout look great though! Hope you get the issue solved soon. Many thanks

Leave a Reply

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