Members-only tutorial
Watch the video and get the practice sheet with membership.
About this tutorial
Annotated transcript
21 formulas linked inline Click any highlighted terms to learn more.<div> Hey, so I have this database here in a sheet and I'm updating it every day. And I have another database in another sheet that is other information, but it's formed in exactly the same way. And I want to get those two together. Create a Many to Many Database inside Google Sheets Share 1 Row to Another Tab, Forever
Maybe this is useful if you have backups, if you want to compare backups or if you want to not backups.<br><br>In addition to backups, if you want to have extra information like from years past or something, maybe you have a database every year and now you're in 2020, or you're preparing for 2021 and you're like, oh, how do I grab 20 20, 20, 20 19, 20 18 data and put that all together? So here's. How I would do it.<br><br>Let's see if it works, because it's fun. We're gonna use some curly brackets. We're gonna create a settings page. It's gonna be really fun. 80 Years In 1 Spreadsheet Make a Simple Calendar Template
So here's where we want, wanna put all data . We have a database one here. Now, if we had two sheets I could tell you exactly how to do that. You would just do equals you put in curly brackets.<br><br> Import range . Import range , not import range . And in import range, we're gonna have the spreadsheet url, something like. This can take the entire URL or just the id? We're gonna get the range, which is db. Nope. It's all, I think all and then exclamation point a. And then what we'd do is we would just combine these, right?<br><br>We would end this where is it? Here we go. Getting Started Coding in Apps Script Link to Another Sheet in Google Sheets
We would end this, and then we would just do that all again for the next. Next one. Same exact thing, but we want to get from here. So let's look at that. And we also want to make this a lot less intense. Okay? So let's not do that. Let's do this. Let's make our lives a little easier.<br><br>We're gonna add a settings. I'm gonna call it settings. We're gonna go and this might work well too, abstract way. How, if you have a ton of different sheets, if you have 20 sheets for the last 20 years. So we're gonna do, let's do DB two. 80 Years In 1 Spreadsheet Share 1 Row to Another Tab, Forever
We're just gonna label that DB two.<br><br>We don't need all of these. Let me just quickly get rid of all of these. Things there. So we want URL in here, and then we want our SH here. Okay, so let's go here. I don't even want the entire url. I just want this. ID Really? Yeah, give me that id. It's called all, so I don't need to remember that. All A to B.<br><br>And then here we're gonna put the id. Okay. So we know we can label these. Absolutely. I'm just saving a little time here. We're just gonna have a label and now we can do DB three, DB four, as many as we want. But let's go back here.
Let's do this equals, and we're gonna put in, actually, let's look at import range first.<br><br>What's gonna happen? I know what's gonna happen, but let's go walk through it. Settings U URL is B one and the range is settings. C one I missed something here. There we go. And so this is the exact same thing as in port range , except we are now abstracting a way that the information is over here, B one and B and C one.<br><br>And it gives us a reference and it says, allow access cuz we need to allow access to that sheet. That's cool. We're gonna do that. I'm gonna do that in a second. GPT in SHEETS Share 1 Row to Another Tab, Forever
But let me show you what happens if we put this in a curly bracket already. We have not given access to it, and we're gonna try this. We're gonna try to add this here A to B to it.<br><br>So now we're gonna have two everything all in one, but it's gonna give us an error and this error is because we haven't yet given it access. So we, I'm gonna delete all of this stuff. So if you don't give it access it, you're gonna have errors. So just allow access and then we get truths, right? But we don't want just that.<br><br>We want everything. We want to add it. We wanna add in series import range .
We're gonna ha use a semicolon here. If you have a different language setting, you might be different. And we're just gonna do DB one eight A. A no, A to B, that's what we're doing. And end curly bracket. And now we get a, we almost got another error .<br><br>Okay, we have this and then let me see how many, cuz we, I put the same name just so we would be able to tell. And now there's only one, there's two now. That was, there we go. So this one is false. And then I think this one is true, so we'll know if they're both on there. It's true and false. Okay, so let's go.<br><br>Is there only one? SUM IF Fuzzy Search
There's two one's true and one's false. There you go. So now we have all of our data from both sheets. The sheet that's on this, the tab that's on this sheet, and a sheet that's on a completely separate sheet, we've now combined them. With these curly brackets, import range , we have also created a settings tab that we can add many more.<br><br>We can add many more sheets here, and then we can create them in series, not create, smush them together in series here. And now we have a way to, combine all that data . We can sort it in another tab, we can say. Sort by name. We can get counts. Figure Out Frequency of Numbers Share 1 Row to Another Tab, Forever
We can start our data crunching and munging not munging crunching here, bite.</div>