Spreadsheet Automation 101 - How to Automate Google Sheets · Lesson 16 of 40

Spreadsheet Automation 101 Lesson 2: Get Values - Introduction

Members-only tutorial

Watch the video and get the practice sheet with membership.

Unlock tutorials
Get Values is done in the Apps Script. In this lesson, you’ll learn what changing .getValue() to .getValues() do. You’ll also learn about Logger and For Loop, which I mention here briefly.
19 formulas linked inline Click any highlighted terms to learn more.

<div>0:00 Hello, welcome to section two. This is Get Values . The other section was called Get Value. And what we did, we went to our app script , extensions app script , which I already have open here.<br>0:12 Last thing we did was we did spreadsheet app, we got active spreadsheet , we got the sheet by name, we got the range and we got a value.<br>0:19 We got one value out of an entire range . Now, the only thing we're gonna do here today right now is we are gonna add one letter.<br>0:27 So on get value, we're gonna change it to get values . Now, what does that do? Getting Started Coding in Apps Script Get Values from Sheet for Custom Function in Apps Script

What does that change about our function that we can do extra?<br>0:36 Well, one is our get range goes from the starting. So the only thing one, one, which is a one, but it allows us to use that as a starting point to then get any number of rows and any number of columns.<br>0:49 So if we want to get say, 20 rows and we want to get maybe that one column, so that's one array.<br>0:56 We'll get into arrays soon, I'll let you know. Spreadsheet Automation 101 Lesson 2: Arrays Count Color by Row

But what I wanna do is I wanna show you what that looks like because it looks a little different.<br>1:05 Let's let's delete all of the Git UI and we'll start using logger. I'm gonna go into Logger a little bit later, but we're gonna use logger.<br>1:14 We're gonna just log the values . Let's change that to the values . Okay, so we're getting 20 rows. What does that look like?<br>1:24 We're just gonna look at this, Val. The values in this log right here. Let's see what it pulls an un an unknown error occurred.<br>1:35 Please try again later. All right, &lt;laugh&gt;, we, we'll try once again. URL Link to Last Row

Well, this is silly me. All right. Up here on Run, we have to select our function that we're running.<br>1:45 So this is very important to do, show a, show a one that's a function we're trying to run. And when we click run, we have to make sure we have the selected one running.<br>1:54 All right, now we're running. Now what do we got here? We got these, these brackets and this is an array of a race, so I'm gonna get into that later in next video.<br>2:06 But I just wanted to show you right off the bat, we're using Logger, which we'll get into soon. Learn to Code in Google Sheets, For Programmers | For Advanced Google Sheet Users

And we're also in this section gonna talk about the for loop.<br>2:15 That's how we end up actually being able to parse and get the right things at the right time. This is really exciting.<br>2:21 And then we're gonna end this section with the on edit trigger . It's just like the on open up here. We just write it right in our our app script .<br>2:32 But it's really exciting because it opens up a lot of options for us. Get ready, let's go get values .</div> Getting Started Coding in Apps Script VIBE CODE GOOGLE SHEETS

Spreadsheet Automation 101: Introduction to Pre-course Videos Think Like a Programmer: Develop The Mindset of an Apps Script Coder How To Change Date Format Automatically Tips to Navigating Thousands of Lines of Code In Apps Script Spreadsheet Automation 101: Functions Spreadsheet Automation 101: Variables Spreadsheet Automation 101: Dot Notation Spreadsheet Automation 101: Camel Case Spreadsheet Automation 101: Parentheses Spreadsheet Automation 101 Lesson 1: GetValue - Introduction to SpreadsheetApp Spreadsheet Automation 101 Lesson 1: Spreadsheet Taxonomy Spreadsheet Automation 101 Lesson 1: A1 Notation vs Row,Column Syntax Spreadsheet Automation 101 Lesson 1: getActiveSpreadsheet() vs getActiveSheet() Spreadsheet Automation 101 Lesson 1: onOpen() Trigger - Custom Menu This Seems Like Automation Spreadsheet Automation 101 Lesson 2: Get Values - Introduction Spreadsheet Automation 101 Lesson 2: Arrays Spreadsheet Automation 101 Lesson 2: For Loop Spreadsheet Automation 101 Lesson 2: Bracket Notation Spreadsheet Automation 101 Lesson 2: Logger.log() Spreadsheet Automation 101 Lesson 2: If ( ){ } and Checkboxes Spreadsheet Automation 101 Lesson 2: onEdit() Trigger Introduction to Spreadsheet Automation 101 Lesson 3 Spreadsheet Automation 101 Lesson 3: MailApp Spreadsheet Automation 101 Lesson 3: Email Yourself For Loop Spreadsheet Automation 101 Lesson 3: Send Email Every Week Trigger Spreadsheet Automation 101 Lesson 3: Email Other People For Loop Spreadsheet Automation 101 Lesson 4: Access APIs Introduction Spreadsheet Automation 101 Lesson 4: UrlFetchApp Spreadsheet Automation 101 Lesson 4: OmdbAPI get ApiKey, get Data in URL Spreadsheet Automation 101 Lesson 4: OmdbAPI get data in Apps Script Spreadsheet Automation 101 Lesson 4: JSON (beautifier) and OmdbAPI parameters Spreadsheet Automation 101 Lesson 4: OmdbAPI Parameter Picker Automatically Clear Content | Refresh Reuse Recycle Templates Automate Google Sheets With Zero Experience Automatically Uncheck A Daily Checklist Activate A Certain Sheet When Opening a Spreadsheet Scoping Functions in Apps Script Breaking Through Errors In Apps Script VAR vs CONST vs CONSTANT in Apps Script