
Do you ever face the tedious task of managing address lists from various countries like Japan, the USA, and the UK in Google Sheets, wishing you could easily separate them by country, state, or city?
This article introduces "AddressParserLibrary," a Google Apps Script library that automates this data cleaning and parsing process with a single click.
Once you add the library, anyone can easily implement address parsing by making minor adjustments to the provided sample code. We will walk through everything from setup to execution in a step-by-step guide that is clear even for those unfamiliar with programming. Start boosting your daily productivity today!


AddressParserLibrary is a Google Apps Script library designed to parse address strings in a Google Sheet into their constituent parts, such as country, city, and postal code. It processes a specified column of addresses in bulk and outputs the results starting from a designated column.
Currently, the library supports the following address formats:
AddressParserLibrary1J2Vy9PJ1d3f2DvvHfbDUJz3j3XPcDZVOlGVnoJ37pUYqZ68wHaVZCysbparseAddresses(sheetName, inputColumn, startRow, outputColumn)Parses the address data in a specified sheet and outputs the results to the same sheet.


+ icon next to "Libraries."1J2Vy9PJ1d3f2DvvHfbDUJz3j3XPcDZVOlGVnoJ37pUYqZ68wHaVZCysb
AddressParserLibrary (you can change it if needed).
Write a script to call the library's function.
You can copy and paste the following function into the script editor to get started.
JavaScript
/** * A sample function to parse addresses in a spreadsheet. */
function parseMyAddresses() {
// --- Parameters ---
const sheetName = 'sheet1';
// The name of the sheet containing the addresses
const inputColumn = 'A';
// The column where addresses are located
const startRow = 2;
// The row where the data begins (assuming row 1 is a header)
const outputColumn = 'C';
// The column where the output will start
// Execute the library
function const success = AddressParserLibrary.parseAddresses(sheetName, inputColumn, startRow, outputColumn);
// Log the result of the execution
if (success) {
console.log('Address parsing complete.');
} else {
console.log('An error occurred during the process.'); }}
sheet1, starting from the second row.parseMyAddresses function, the addresses from column A are parsed, and the results (country, city, postal code, etc.) are outputted into columns C, D, E, and so on.
No, not the moment the page loads. As explained in the "Implementation Points," the animation that counts up from 0 starts only when the visitor scrolls down and this module enters the browser's screen (the viewport).
No, you cannot. According to the "Detailed Input Fields" in this article, this module provides only one color picker called "Text and Number Color (text_color)." This setting is used to change the color of all text elements (Title, Number, and Suffix) all at once.
On a smartphone (a small screen), they will automatically switch to a vertically stacked layout instead of being side-by-side. As explained in the "Implementation Points," the module uses CSS Flexbox with flex-wrap: wrap, allowing it to respond automatically to the screen size.
We can customize this sample to match your specific business requirements.
Book Free Consultation