Hey there stranger!

Sign up to get access.

Sync Tabs in Different Sections

About this Tutorial

How to sync different sections on different tabs. In this case we're taking data from multiple tabs putting into one, and syncing between those.

Video Transcript

00:00 In previous videos, I've shown you two things. One, I've shown you how to sync tabs, two tabs where the data needs to be the same in some sections, so A through C or D like the first four columns.
00:12 The data is going to be the same no matter which one and they're going to sync uh with each other.
00:16 If you edit data on any cell, it'll be updated in the other one. And then in another video, I showed you how to do that with many sheets.
00:24 So if one, two, three, we have four sheets here. All of these are uh. It synced and so if I change in a name here in column B, it is going to be changing three, four and three, two and one.
00:37 All of the tabs. No matter what the, the styling and formatting is, this is great if you have multiple people working with similar data.
00:45 They're editing the data, but it needs to be synced, but they're adding more. Like here we have notes, so maybe Bob is working on sheet one and someone needs to see Bob's notes, but also add their own, but Bob doesn't necessarily seem to need to see his other people's notes.
00:58 Umm, and also this is very much for like a shared workspace workplace where you- you know it's not so bad if Bob sees other things, but it's not really within his work day that he needs to really see these other notes or these other data.
01:12 Bob needs to do one thing and then maybe to other people need to do other things with that same exact data with Bob's notes, but Bob doesn't need to see their notes.
01:20 But he can if he wants. So this is umm again the video was to sync many tabs, but the question that I got from a member about that was how to sync if I have multiple clients working.
01:36 In multiple places like multiple sheets. I want to work with them in those individual sheets, but I also want to see and work with the data with all together in one place to some extent.
01:47 So how do we do this? And again it's very different. It is rather different. And per business case. So I'm going to try to create a little thing here that doesn't sync across all four.
02:00 But rather umm does create a umm a sort of master document. But in different sections let's say. So let's go, let's close this one so we're only working on a copy of this.
02:18 Eric, Apps Script looks like this currently. Uh, what it will do is again sync. Cross all four but let's say we want actually.
02:27 She one is you know Bob. Uh, sheet two is Carl and we want a master list. I mean let's call it main instead of master.
02:43 Umm. And what we want to do is we don't really care about these nodes. Actually we do care about these nodes but essentially what do we want to do? We want to create a dashboard to see everything.
02:58 So Bob and Carl will see their own but on the main we'll see both of theirs. But in different sections not in column 1, 2, a, b, c, d.
03:08 The force. So let's do a little bit editing here to make this a little simple. So we have three sheets here.
03:14 We're going to have to rename them because I renamed these tabs here Bob, Carl and Main. So we'll have Bob, Bob, Carl and Main.
03:28 And now if sheet one is edited sheet two and three are going to be also edited. That is correct. And let's say Bob, Bob's work is here the first four columns.
03:43 As always, I'll And on main we're going to keep him in the first four columns. But we want a little section here.
03:50 We're going to have a little bit of a brace and we want to have coral stuff. So we're just going to take one two and three.
04:00 We're going here and copy it over to here. And now we'll have actually we should probably get Carl's notes as well.
04:11 So let's fix this a little bit. We're going to limit the column to four. Meaning anything under four, one, two, three is going to be that uh, edit.
04:21 I'm going to . . We have Carl's notes, mainly going to call us Bob's notes, and we're going to call And notice that Carl needs to go to column 6, 7.
04:48 8 and 9. So let's edit that. So sheet 1 is going to be exactly the same as we did before.
04:58 It's going to copy to, umm, not actually 2 and 3. It's only going to copy to 3. So we only want 3 here.
05:13 Okay, that's done and done. Now Carl is going to sheet 2. If sheet 2, we do not want to copy.
05:20 We need to sheet 1. We only want to copy to sheet 3 or main rather. So 4th, take out the 4th, take out the first one and we only want to copy the 3rd.
05:33 But we need to make sure that we change this column. So the column is this C variable. Uh in this case we are just going to add this will be 1 so we just need to add 5 to it.
05:47 C plus 5. Same row, umm, take my name for you. We just move the column. Now if we edit anything on the main one we do want to make sure we want to move those edits over to either Bob or Carl.
06:05 The funny one or the tricky one is going to be Carl. Because Bob, we're going to leave the same if an edit on sheet three and the columns are the same.
06:17 We're just going to copy two. And actually, if three, make sure it's one. Done and done. Just make those edits.
06:30 Same edits. Now how do we copy if sheet three? Let's copy this. Paste it. Now this is, Carl's edits on main need to sync to Carl.
06:48 Okay so if sheet three row is over one we're looking at column, six through nine. Row and column is greater than or equal to six and column is less than, or equal to nine.
07:14 So it's between six and eight or nine. If that's the case, we want to edit on column minus five. And we need to edit on the, second on sheet two.
07:34 So this will be Carl sheet. Make sure we change that. And the column is going to be minus five. Because, Because it'll be the exact same column.
07:46 If it's column six it'll be moved to column one. If it's column nine it'll move to column eight. So do not eight.
07:51 Sorry. Uh, four. Uh, so we do meet column minus five. That's the edit here. So we meet. Make sure that our section, even though we're editing on a different column.
08:00 . In the main one, uhh we need to make sure yeah sheet three is main. Main. Main. Perfect. Let's test this out.
08:14 So bob. Carle. Similar data. Or they might have different data, but we want to move bob over to here. Carle to here.
08:24 Let's make sure we're. Did we we lost frenzy here? On main it is now lost. Let's see if the if it works the other way.
08:36 So let's say oh we lost Kokomo and he's Kokomo lost perfect bob and main are synced. We also have Carle is synced I think one second.
08:47 Did we. Oh we don't need to sync to um two here. That's the one thing we have to delete. So we only want that bob to go to main.
09:01 That's the one I changed to. So now let's say. We have different names here. We have Fran, Bart, Mickey and Donald.
09:15 So on call on the main, none of the bob section. Changed by yes. We changed here on the main. So now we can see both bob and Carl here.
09:26 Two different sections. We can edit this as well. So hey, that's actually Mickey K. Go back to Carl. Mickey K is updated and bob is stinky.
09:36 So there we go. We have now sink tabs in different sections to bob and Carl to main. And if you want to add more, right?
09:46 Just need to get the logic correct here. Just need to make sure all of the individual sheets are going to the main sheet or, There are section and that section is also sinking back to each individual one.
09:57 We can use this if multiple ways, uh, using this limit column and then using these columns over here. This ampersand make sure this is end.
10:07 So all of these things need to, be true in order for this section to happen. If any of these are false, this section won't happen.
10:14 Same up here. We're using end as well. Alright. I hope that makes sense and grab the sheet here if you want to take a look at the app script yourself.