Free, independent guides since 2010

No-code & automation

Google Sheets automation with formulas and Apps Script

How to automate work in Google Sheets: powerful formulas, importing data, form responses, simple Apps Script for emails and scheduled tasks, connecting to other tools and when to switch to a database.

<guide section="No-code & automation" type="article" read="1 min"/>

For many small businesses, a spreadsheet is already the centre of operations. With a few formulas and scripts, it can also do the work. Excel users can do similar things with Power Automate and Office Scripts.

Formulas that save time

FormulaUse
=FILTER(A2:D, C2:C="open")Show only open items
=QUERY(A1:D, "select A, sum(D) group by A")SQL-like summaries
=XLOOKUP(E2, A:A, B:B)Find values in another table
=IMPORTRANGE(url, "Sheet1!A:D")Combine data from other sheets
=IMPORTXML(url, "//h1")Pull data from web pages with XPath (see XPath)

A first Apps Script

Extensions → Apps Script. This script emails a reminder for overdue items:

JavaScript
function remindOverdue() {
  const sheet = SpreadsheetApp.getActive().getSheetByName('Tasks');
  const rows = sheet.getDataRange().getValues().slice(1);
  const today = new Date();
  rows.forEach(([task, owner, due, status]) => {
    if (status !== 'done' && due && due < today) {
      MailApp.sendEmail(owner, 'Overdue: ' + task, 'This task was due on ' + due.toDateString());
    }
  });
}

Add a time-driven trigger to run it every morning.

Connecting Sheets

When to move on

Thousands of rows, many tabs referring to each other, several people editing simultaneously, or personal data that needs access control: time for an online database or a proper system.

Frequently asked questions

Is Apps Script hard to learn?

It is JavaScript with ready-made objects for Google services. Simple scripts are a few lines, and AI assistants can help write and explain them.

Can Sheets be a website back end?

For small, low-traffic uses – like a list of events – yes, via published data or the API. For anything important, use a proper database or CMS.