App Script Tutorial - Google Sheets - For Loops, Looping Through Cells, Variables, Comments - Part 2
Вставка
- Опубліковано 25 сер 2024
- Video tutorial series about Apps Script (JavaScript) in Google Sheets (Excel VBA Equivalent).
In this tutorial we'll cover how to work with variables, for loops, how to write comments in Google Sheets script editor.
Google Sheets
www.google.com...
Website:
www.chicagocom...
Its my first time writing code and your teaching was so effective I understood it conceptually before I could even do it physically. Everyone tried to show me physically but I couldn't get it because I didn't understand it conceptually.
Once you explained App then Spreadsheet then sheet then cell, I got it instantly, and I was visualizing the same process for forms, docs, email etc. You showed me where to find the "Holy Grail" of functions, and showed me how to fit them together. Now It is now up to me to be creative and mix and match the functions that I need to do whatever and lay them out in that particular order.
Its like learning how to walk everyone else told me to put one foot in front of the other..You brought me a skeleton, showed me how the bones and muscles worked, and with that I realized I can run walk jump, hop skip and dance.
halfway through your video I was changing background color, string color, and trying all sort of experiments from the function list. I even wrote all the var code in one line with multiple "." to see if it worked and surprisingly it did to some degree.
give a man fish he feeds for a day, teach a man how to fish you feed him for a lifetime.
With this video you didn't teach me how to code, you taught me how to get what i need and how to put it together, that's not coding that's survival.
function learnBasics(){
var app = SpreadsheetApp;
var ss = app.getActiveSpreadsheet();
var sheet = ss.getActiveSheet();
sheet.getRange("A:Z").setValue("A Big Thank You");
sheet.getRange("A:Z").setBackground("#d7f442");
sheet.getRange("F7:F11").setBackground("#5a6b06");
sheet.getRange("L7:L11").setBackground("#5a6b06");
sheet.getRange(24,6).setBackground("#5a6b06");
sheet.getRange(25,6).setBackground("#5a6b06");
sheet.getRange(26,7).setBackground("#5a6b06");
sheet.getRange(27,7).setBackground("#5a6b06");
sheet.getRange(28,8).setBackground("#5a6b06");
sheet.getRange(29,8).setBackground("#5a6b06");
sheet.getRange(30,9).setBackground("#5a6b06");
sheet.getRange(31,9).setBackground("#5a6b06");
sheet.getRange(29,10).setBackground("#5a6b06");
sheet.getRange(28,10).setBackground("#5a6b06");
sheet.getRange(27,11).setBackground("#5a6b06");
sheet.getRange(26,11).setBackground("#5a6b06");
sheet.getRange(25,12).setBackground("#5a6b06");
sheet.getRange(24,12).setBackground("#5a6b06");
you are a genious
Thanks for those videos, i was really trying to make a script for a db in sheets and after many hours searching and having errors, your explication give me an idea of how does those scripts function and i solved my problem. You saved my :)
I am moving back and forth your videos. now I am getting a glimpse of App script. thank you.
Excellent!
Your first tutorial was the best tutorial I've ever seen, any genre. Good work! I hope this one is just as good.
never thought one of the best way to learn basic Javascript was thru Google Sheets, thank you!
same applies
Ive gone thru so many of these and finally someone that can explain it. Even the google guys can't explain as well as you. Good job - ill check out the next couple
amazing tutorial so excited to see the whole series!!
já assisti vários vídeos desse cara, ele explica muito bem! Material gratuito de qualidade!
i just discovered these videos and they are SO GREAT! Thanks a lot!!
Excellent way of Teaching......Thank You !
Great! You make it so easy to understand. It is just my day 2 of learning and I am enjoying it, thanks to you.
Thank you!!! (from Brazil)
Excellent stuff. Very good way of explaining the code. Keep it up and thanks a lot for creating these videos. Wish you all the best
Thansks Sir for your detailed explanation.
The actual discussion of how to run a for loop starts around 11:45
LOL
For the people who actually came to this video prepared lol
Best video to learn Google apps script
Thanks for sharing great videos always
👍
You are really great !!May lord shiva bless you with everything
Thank you!
nice! very simply for use. thanks for the video
Excellent tutorials! It has helped me a lot.
Nice job. Most of the time, I use functional programming instead of traditional loops.
Hi Code Teacher,
Thanks for your good explanation about the For Loop !!
Thank you very much, you are very good at explaining!
Thank you so much! This has literally saved my! THANKS!
These are really great! Thank you!
great
Tremendous tutorials! :D Thanks for sharing!
I want to learn more about loops and copying ranges to another sheet, in order to take the answers from a Google Forms form and convert them into a sheet with a list format (to use it as the base list for a pivot table). Could you help me?. Thank you for your time and sorry for such a long text!
my unimportant comment (MUC) ... 1:42 Some versions of Fortran allowed spaces in variable names.
How did the interpreter know that the variable declaration was over?
You are awesome.!!
Hello! Thanks for the wonderful tutorials, I'm really enjoying them. Question: is there a way that I can define a variable in the Script Editor and then use it in Google Sheets itself? Thanks in advance.
Great teaching .. thanks
Wonderful tutorials, thanks!
Merci! (Thank you!) from Montréal
Great
Also give the link of the previous videos you refer to in the description.
It is possible to set the variable outside and before the for loop? If is possible will it affect the speed of the code since the variable only set once unlike setting it everytime the code loops?
Thanks
i love it!
How does i++ mean that it is increasing by 1? How do you make it increase by a different amount?
i = i + 2
@@ExcelGoogleSheets interesting
Hello, how can you do a FOR loop with two columns? Ex: phone number and message
is there a way to hide sheet tabs (only tabs and not sheet) in google sheets ?
Why there is no saveAndClose () for sheets in app script. My sheets get modified in app script and when emailed automatically in app script , it sends the unmodified email. Help
Do you have any video that talks about "how to create folder in Google Drive and the folder contains n number of spreadsheets"
I don't get any reference when I write code like at this place 1:04 it pops up a lot of options. I also want that in my app script please help me
I have no idea how this is working, but I got it working with this.
for(var i=1;i
what's your point
2 words... awesomesauce
smooth coding
How were you able to getRange() using a string and a number? Mine errors expecting me to use "A1:B2" format. It won't let me use i+8
You need to use getRange() on a worksheet object, not a spreadsheet object.
sos un crack
Sir can you help with google sheet scripts
Pls help me to use vlookup fn. By script, dynamically.
Nice
My R1C1 references don't seem to work like in the video. I can only use A1. Anybody know why?
How do you loop through an array of OverGridImages?
Bro! which version are you using?
thanks
Excelente video ... cómo puedo filtrar una hoja en google sheet ? cuál sería el código o script ? God Bless You.
df
Can make user form in google sheet like as excel vba?
i think so
Hi! Question: how do you make a loop of the code and stops when it finds an empty cell?
You use a while loop with an if statement, but this is not a good practice. Most of the time there is a better way to approach this.
@@ExcelGoogleSheets can you provide me with an example for this? Let's say if a column has an empty cell, it stops the program/loop
var ss = SpreadsheetApp.getActive();
var sheet = ss.getActiveSheet();
var cell = ss.getCurrentCell();
var cellValue = cell.getValue();
while (cellValue != "") {
cell = cell.offset(1, 0);
cellValue = cell.getValue();
}
@@ExcelGoogleSheets very helpfull
please sir if you can always shear the link to your earlier lesson(I mean part one
) on descriptions so that we can browse them faster. thanks so much
look on the playlist
Could you please assist.. A code to get a active cell after A1 and till last active cell.. Which means range that should be the active cell which is next to A1 and. Active();
Please help
get last row and last column from the active cell and use them inside getRange(1,1,lr,lc)
Hi! thanks for sharing. What about using "let" or "const" instead of "var" to declare variables? I am doing a course in Codeacademy and they are not using "var" anymore.
Thank you.
As far as I know Apps Script doesn't support ES6 at this point, so you'll need to stick with var for now.
@@ExcelGoogleSheets interesting explanation
🙏🏻
Sir i have difficulty in running for loop i understood the concept of for loop but it is not working and taking lot of time to load can ypu help me on that
ua-cam.com/video/985XJOeigpA/v-deo.html
@@ExcelGoogleSheets sir i have watched this video of arrays of arrays and it is very much help ful when we are dealing with large no data but i am trying for lop for very small data range then also its not working 😢😢
And it is easy but i dont why its not working at first i tried by myself i didnt work then i did step by step as per your video then also not working
@@siddharthjain6629 u gotta uptade the version of you script
the name part 2 let move at the Begin of video name.
Hi Everyone, How can I apply a "breakpage" on spreadsheet using Google Script?
Thank you all!
you are ready know
16:33
you are ready know
Has anyone found part 1 of this tutorial ?
ua-cam.com/video/aPJ-2U45BpA/v-deo.html
@@ExcelGoogleSheets Thank you very much.
please help me
Half of the video is the same stuff as the last video
u gotta be sure of your words but they are very different
great