Skip to content

Instantly share code, notes, and snippets.

@al-codaio
al-codaio / google_sheets_fill_values_down.js
Last active February 20, 2023 17:53
Fill cell value down until a new cell value occurs - Google Apps Script for Google Sheets
// Google Apps Script to take a value in column A and fill it down until a new value shows up in a cell for Google Sheets
// Author: Al Chen (al@coda.io)
// Last Updated: September 6th, 2020
// Video tutorial: https://youtu.be/t-32QkyjKVE?t=106
function fillValuesDown() {
var spreadsheet = SpreadsheetApp.getActive()
var currentRange = spreadsheet.getRange("A2:A" + spreadsheet.getLastRow())
var newRange = []
var newFillValue