This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 ([email protected]) | |
// 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' VBA script to take a value in column A and fill it down until a new value shows up in a cell for Microsoft Excel | |
' Author: Al Chen ([email protected]) | |
' Last Updated: September 6th, 2020 | |
' Video tutorial: https://youtu.be/t-32QkyjKVE?t=1109 | |
Sub fillValuesDown() | |
Dim lastRow As Double | |
lastRow = ActiveSheet.Cells(Rows.Count, "B").End(xlUp).Row | |
Dim currentRange As Variant: Set currentRange = ActiveSheet.Range("A2:A" & lastRow) | |
ReDim newRange(1 To lastRow) |