Password Protect Google Sheets

Learn how to password protect your Google Sheets to restrict access to sensitive data using Google Forms and Apps Script in this informative tutorial.

So, you have sensitive data . You have data you don't want everyone to see, but you want some people to see it if they have a password. This video is not about protecting your sheet, going down here and clicking protect sheet because that doesn't allow people to be added themselves if they had a password. It just says, "Hey, don't edit this or something like that." But this whole entire spreadsheet , if we want to password protect it, I'm going to show you how.

The first thing we're going to do is we'll create a new sheet file, new spreadsheet . And it's going to be a completely separate sheet because we may not want the people who are entering their email address and the password. We might not want it saved here on this sheet. So, we'll create a new sheet and we'll call it passworder.

Now, we're going to add this function as a trigger on form submit . So, we're going to have an event here.

So let's make sure we have the password. That's going to be A1 on the sheet called password. So variable password equals spreadsheet app.getactive

Get the email by doing event named values and in curly brackets we'll say email.

So if these passwords are different passwords, we'll get user not added, password incorrect. So save that and again we'll go and fill in the form.

If the password is correct, it will actually add you as a viewer of this sheet.

Make sure you check out this video or this video and subscribe right now to get more tips, tricks, how-tos.