Google Sheets - Apps Script Fill Down Formula (Set a Fromula & Copy Down AutoFill) Tutorial - Part 9

Поділитися
Вставка
  • Опубліковано 26 сер 2024
  • Video tutorial series about Apps Script (JavaScript) in Google Sheets (Excel VBA Equivalent).
    In this tutorial we'll cover how to Fill Down a Formula (Set a Fromula & Copy Down with AutoFill) in Google Sheets using scripts. We also cover how to get last row in our data. Methods used: setFormula, getLastRow, copyTo, getRange.
    Google Sheets
    www.google.com...
    Website:
    www.chicagocom...

КОМЕНТАРІ • 169

  • @aramisfarias5316
    @aramisfarias5316 2 роки тому

    90% of what I know from app script I learned from you. Thank you! It has been really helpful in my job.

  • @imranmasud4032
    @imranmasud4032 2 місяці тому

    I don't have anything to say.... Boss!! just Salute...

  • @FeriFajarS
    @FeriFajarS 2 роки тому +5

    This is a great tutorial. Very clear and easy to understand. Thanks for making this tutorial. I love it very much.. 😍
    Now, I can add ordered number automatically when new row filled.

  • @azairvine
    @azairvine 5 років тому +5

    Best creator of tutorials on the internet!

  • @davestorm6718
    @davestorm6718 2 роки тому

    Perfect. I've seen absurdly convoluted ways of doing this, but this is the fastest way so far.

  • @monitoreoyevaluacion1278
    @monitoreoyevaluacion1278 2 роки тому

    I just tried this, great tutorial!, you can also fill down using the arrayformula in the formula. Works as well

  • @tjo2go
    @tjo2go 4 роки тому +2

    Finally, the information I've been looking in search of for months! Thank you so much! Can you please tell me how to have the script do that on a specific sheet (tab) that isn't the active one? I'm new to scripting, so if that doesn't make sense please tell me and I'll figure out a better way to ask.

  • @sylviapratiwi7683
    @sylviapratiwi7683 5 років тому +2

    You can change var fillDownRange = ss.getRange(lr, 4) so it will copy the formula (only) to the last row, in the case of new row addition (with proper trigger)

  • @user-el4br5js6c
    @user-el4br5js6c Рік тому

    Super helpful thank you!

  • @russellgregory4653
    @russellgregory4653 2 роки тому

    Absolutely brilliant, thank you. Google let me right to you, as I'm a subscriber I should have know to just check your channel first. Needed this today!

  • @desktopsupport6575
    @desktopsupport6575 3 роки тому +3

    another awesome tutorial, thank you :)

  • @dishydez
    @dishydez 3 роки тому +3

    Great video! Is there a way I can tell it to do the same function but change the formula and the range? Or do I have to copy and paste it each time for a different formula and range? Thanks again!

  • @quilpueemprende4393
    @quilpueemprende4393 4 роки тому

    it works perfectly! also you can add others columns as you need. Tks!

  • @pascalmax8037
    @pascalmax8037 3 роки тому +1

    Very helpfull thanks

  • @AlejandroLamothe
    @AlejandroLamothe 5 років тому +3

    Excellent video, do you know how I can haveit set it up so when ever I fill new range of sell the formula applies?

  • @Knych-nr4ot
    @Knych-nr4ot 6 років тому

    I do have a Main sheet (dashboard) that will create multiple tabs(sheets) using the values added by the user in column A, then I have 2 template sheets- Score sheet 1 and score sheet 2.
    in score sheet 2 in L22 it is getting the value from Score sheet 1 using = '!score sheet 1'! l22, what i needed is it will automatically be added to each new tab.or even if i have a new button to replicate the formulas correctly.

  • @thesambajaj
    @thesambajaj Рік тому

    Superb tutorial. Just started learning appScript from your playlist. Is there a simple way to getLastRow based on last avaialble values of a particular column. Example "B:B"

  • @ericyang879
    @ericyang879 3 роки тому

    awesome tutorial - simple, clear, very useful!! thank you

  • @jaydalal99
    @jaydalal99 4 роки тому

    Struggling with trying to write a script to paste templates on sheets based on whether checkboxes are ticked, is there a way to do it?
    The logic is
    If A1 is “TRUE” on sheet 1
    Find an A1:B5 which is on sheet 2
    Paste this A1:B5 on sheet 3
    In the next blank cell after 3 in the column A
    And this repeats for A1 to A10 on sheet 1
    Any help is appreciated

  • @brianquinn4591
    @brianquinn4591 2 роки тому

    Excellent clear video - as usual :)

  • @halpwr
    @halpwr 4 роки тому

    Thanks for the video! Going to do a batch of these hopefully. Also, I saw that error midway through! Ha

  • @amirokhovat4699
    @amirokhovat4699 4 роки тому +1

    Thanks a lot, That was awesome!

  • @Amanda-ek6dz
    @Amanda-ek6dz 3 роки тому

    awesome tutorial
    worked great

  • @forestlandsshareholder8550
    @forestlandsshareholder8550 6 років тому

    Solved it, changed line 89 to this. var fillDownRange =sheet.getRange(2,2,lr-1,7); Seems the fourth number in the getRange is the number of columns to the right of the first paste column, not the ninth column in the sheet. Also changed ss to sheet, may have had an effect. Works well now....

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  6 років тому

      that's correct, it's the number of columns in the range, not the column in sheets.

  • @gabrielgonzalezzabala7303
    @gabrielgonzalezzabala7303 2 роки тому

    Great tutorial. I put it in Speed 2 and looks like normal pace

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  2 роки тому

      Yea, my pace was much slower in older videos, so that makes sense.

  • @devinolsen63
    @devinolsen63 2 роки тому

    Thanks, this is very helpful! Do you have a video for how to then copy the formula output and paste the numbers over the same range as values only?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  2 роки тому

      Just record a macro and you'll have an example ua-cam.com/video/UlOGJcfpfKU/v-deo.html

  • @syafiryandarmawan547
    @syafiryandarmawan547 2 роки тому

    Really good explanation, and i'm always trying to make a project like your video. But i make a little tweak with appendrows for the first to third column to fill. The problem is the result which mean shows in the forth column can't show automatically after A-C column fill with the appendrows, is there a way to make a result show in the forth column automatically without trigered by run button in the app script?

  • @gsmapps346
    @gsmapps346 5 років тому +2

    Great tutorials - how can one insert an automatic trigger ( onEdit perhaps) to calculate x+y=z for example on addition of a new row.

  • @strangeDog
    @strangeDog Рік тому

    useful 👍👍

  • @ElizabethGemmell-ss2ue
    @ElizabethGemmell-ss2ue 3 місяці тому

    I'm having difficulty inserting a more complex formula into this script. It keeps giving me a syntax error saying I'm missing a ")" somewhere in the formula "=If($B$4:B="",,iferror(vlookup($B$4:$B,'Recurring Expenses'!$B$1:$C$22,2,0),""))". I've got a couple other simple formulae in the same script that work fine. Any suggestions on how to resolve this issue?

  • @guilhermelopes5130
    @guilhermelopes5130 3 роки тому

    Thank you so much!

  • @sanjay.bhatnagar
    @sanjay.bhatnagar 6 років тому +1

    Very well explained

  • @yantiratnasari4083
    @yantiratnasari4083 3 роки тому

    hi, thanks for your video. how to make it work for vlookup formula from different sheet

  • @TrueXiarno
    @TrueXiarno 2 роки тому

    6:20 How do you make this auto completion happens with everything in parentheses ?
    I can get the auto completion but no function in the parentheses appears like yours.
    I use the latest version of chrome.

  • @chelsea6927
    @chelsea6927 5 років тому

    Thanks for this great tutorial! Does anyone know how to keep the formula from overwriting the fill color of the cells?

  • @sathianarayanan6550
    @sathianarayanan6550 5 років тому +8

    Need fast result on how to change from formula to just autofill as 'Update', whenever new row added

  • @OlovarYes
    @OlovarYes 2 роки тому

    Awesome! Thank you for this. But I have question. What if I have formula with multiple IF's linked to another sheet???

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  2 роки тому

      It doesn't really matter what the formula is. Maybe just use ` instead of " for JavaScript string qualifier so you don't need to escape quotes in your formula.

    • @OlovarYes
      @OlovarYes 2 роки тому +1

      @@ExcelGoogleSheets Thanks. It works! 👍

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  2 роки тому

      👍

  • @ElectroSonic15
    @ElectroSonic15 5 років тому

    Thank you so much!! Been looking for a solution forever that works better than using =ARRAYFORMULA

  • @nxchauvin
    @nxchauvin 5 років тому

    Solid Tutorial. Is there a way to do this but do it for every other row instead of every?

  • @CHETANSOMASHEKAR
    @CHETANSOMASHEKAR 2 роки тому

    Hi, all your videos are amazing and loved them!!! Is there a way to write a script to add different formulas in different columns in on edit where it doesn't refresh every time I change a cell data?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  2 роки тому

      I have to be honest, I don't understand what you're trying to do.

  • @PiotrPL1234
    @PiotrPL1234 4 роки тому +1

    Or we can use for loops and we have for(i=0; i

    • @matopuk123
      @matopuk123 4 роки тому

      but then it depends how you are writing the data. Accessing the SS is time consuming, you won't notice it here, because it is just one time accesed, but doing it with looping you will notice.
      But if you want looping (to have more controll) you can build an array of whole column in your script and then once push/acces SS.

  • @suryasprings5431
    @suryasprings5431 4 роки тому

    if we applying formula which include another sheet range then?

  • @user-cc3eu4ng7f
    @user-cc3eu4ng7f 4 роки тому +1

    Great video it is exactly what I need
    I have error message please can you help me fix it my formula is
    =ifs (c3=0,"A",c3=1,"B")
    I did exactly the same code you made it in this video but it show error in the line that contains the formula.
    I will grateful if you answer

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 роки тому +1

      use single quote around the formula setFormula('=ifs(c3=0,"A",c3=1,"B")');

    • @user-cc3eu4ng7f
      @user-cc3eu4ng7f 4 роки тому

      @@ExcelGoogleSheets
      Thank you so much it worked

  • @lm4363
    @lm4363 4 роки тому

    Is it possible to copy down formula in multiple columns down to the last row?

  • @evrenkonak
    @evrenkonak 5 років тому

    Anyway..so smart ..Thank you.

  • @dogistyle89
    @dogistyle89 5 років тому

    Hello i have an issue while using this script with VLOOKUP. As soon as i let the script paste in my VLOOKUP it returns #NAME? - But if i copy this from C3 manualy to let's say C4, VLOOKUP will work as intended.
    do you have an idea how to fix it ?

  • @meowbiich1689
    @meowbiich1689 4 роки тому

    thats cool tutorial i tried to replace formula with split text,
    but it said syntaxError missing ) after argument list Line 37
    i dunno what to do, this is my first time, you may know the correct syntax
    (Line 36) var ss = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
    (Line 37) ss.getRange("D3").setFormula("=SPLIT(C3," ; ")"));

  • @MaxGong333
    @MaxGong333 5 років тому

    Hello. Always thanks for your Video from S.Korea.
    I try to put this formula in Java.
    =if(AND(iserror(find("ABC",AC3)),iserror(find("DEF",AC3))),value(mid(AC3, FIND("(",AC3)+1,6)),"")
    But it said 3rd line need ( before the factor.....
    It didn't work..
    What sould i do ? Can u help?
    Thanks.

  • @24x7fun21
    @24x7fun21 3 роки тому

    Thank you for this amazing video!
    It is not working in my google sheet (google sheet is linked with google form). Responses and entering are recorded in the google sheet but using script suggested by you is not working in my case unless I manually make some edit in google sheet.
    Here is the scenario, I understand that there will be time stamp recorded in google sheet as soon as google form response is submitted, but if a person edit that response tomorrow the time stap date changes. I want to record original date and time when that response was submitted. I think as google sheet is automatically filled by the google form your script is not working as it works as per the cell changes/edit.
    Please help me if you have some script for my scenario.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  3 роки тому

      Use array formulas instead or setup a trigger onFormSubmit.

  • @smartscriptsv
    @smartscriptsv 4 роки тому

    Thanks My Friends!

  • @JefArtist
    @JefArtist 2 роки тому

    I have a problem. How would you do so that the code is reproduced automatically while you are adding more rows with information
    with onEdit?, if that's how the code would be, help!

  • @heetventures3579
    @heetventures3579 5 років тому +1

    Haloo sir, I want to autofill the formula whenever a new row is added in the last of the sheet without running the script again and again

    • @sharlajosh
      @sharlajosh 5 років тому

      That's what I want to do also. Any tips?

    • @sharlajosh
      @sharlajosh 5 років тому +1

      Just found the answer. Use function onEdit(e){} - developers.google.com/apps-script/guides/triggers/

  • @sharlajosh
    @sharlajosh 5 років тому

    Thanks!

  • @halpwr
    @halpwr 4 роки тому

    Do you do consulting work?

  • @makalele33
    @makalele33 3 роки тому

    How can I add a formula that has a value from another sheet in the same spreadsheet. When I set the formula it links back to the same sheet

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  3 роки тому

      Use ` character for javascript quotes for formula text and it should work fine.

  • @johnn4314
    @johnn4314 6 років тому

    Quick Question for you. If I run a loop, can I grab multiple values by virtue of having the i variable in the .getRange before the
    .getValue as shown below.
    Below is only a portion of what I wrote. So as long as i put the collection of the data in sheets (getRange.getValue) inside of a loop, shouldnt it collect all the values that it loops through? Or is the "if" the problem? because it doesn't know in which situation of many I'm talking about?
    function myFunction() {
    var app=SpreadsheetApp;
    var sheet= app.getActiveSpreadsheet().getActiveSheet();
    var lastRow= sheet.getLastRow();
    for(i=4;i

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  6 років тому

      Your code looks OK to me with exception that it's mission a closing brackets for your for your loop and function. I don't understand what you're asking though. You need to better explain what you're trying to accomplish.

  • @phoenixempire8886
    @phoenixempire8886 4 роки тому +1

    🙏🏻

  • @alexkong93
    @alexkong93 6 років тому

    nice video

  • @cgerard14
    @cgerard14 4 роки тому

    Awesome! Thank you so much for this. I've been searching for something easy like this for ages. Question though, how do I get this to only be applied to 1 of the 3 tab/sheets I have on the Spreadsheet?
    I have 2 tabs (Tab/Sheet 1 = "Milestones" and Tab/ Sheet 2 = "Weekly Totals").
    The script works perfectly, but it is being applied to the Row on *both* sheets, whereas I only want it to be applied to Sheet 1, "Milestones"
    (not sure if it makes a difference but I am tacking on this script after another I've written that is calling out to the same Sheet)

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 роки тому

      add an if statement. if you search for my onEdit videos I have an example of that.

    • @pauloteixeirafilho
      @pauloteixeirafilho Рік тому

      Maybe you can use var ss = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Milestones");

  • @marythr2617
    @marythr2617 3 роки тому

    Hello, is there a way to use app script to pull shipping status information from carriers like usps/ups/fedex etc...? is there a way to do this in google sheets? Thank u.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  3 роки тому

      Should be possible if you have account with API access.

  • @seancheri
    @seancheri 6 років тому

    This is a great video and I am learning a lot from all of your videos. I tried this App Script with an IFS formula, but I'm getting a "missing ) after argument list" code. Any suggestions?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  6 років тому

      Share the code, it's impossible to know what you mean by description.

    • @seancheri
      @seancheri 6 років тому

      Thanks, I will give that a try

  • @denicolas260
    @denicolas260 7 років тому

    excelente

  • @user-cc3eu4ng7f
    @user-cc3eu4ng7f 4 роки тому

    Sorry to bother you again
    I do really need your help for my graduation project .
    I want to give value equal for example to "one" two row if it is between two specific row (duplicated) .
    Please help me to solve this problem and thank you again

  • @sktbdotedu9899
    @sktbdotedu9899 4 роки тому

    Excellent. I have a question, how do I use this formula to copy a query formula. I keep getting error messages when I do so. Can you help me.

    • @sktbdotedu9899
      @sktbdotedu9899 4 роки тому

      I want to set this formula to my first cell but keep getting error messages
      =IFNA(QUERY(SEBAB!A:C,"select C where B = '"&M2&"' and A >= date '"&TEXT(A2,"yyyy-mm-dd")&"' and A < date '"&TEXT(A2+1,"yyyy-mm-dd")&"'",0),"")

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 роки тому

      use single quotes for javascript quotes '= '"&M2&"' and A >= date '"&TEXT(A2,"yyyy-mm-dd")&"' and A < date '"&TEXT(A2+1,"yyyy-mm-dd")&"'",0),"")'

  • @MikeJarocki
    @MikeJarocki 5 років тому

    Love your tutorials! Any idea how to integrate a flush & sleep to add a delay between each row processing? It works great for a web scraper we've built in gsheets, but problem is it executes for all 200+ rows at once. What would be perfect is ... C1 processes, wait 3 seconds, C2 processes, wait 3 etc. Can't get it to work however

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  5 років тому

      Have you tried Utilities.sleep(1000) ?

    • @MikeJarocki
      @MikeJarocki 5 років тому

      @@ExcelGoogleSheets Yup - It waits 1000ms, then still executes all at once, rather than a 1000ms delay between each row. Thinking it needs to be redone in a loop

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  5 років тому

      Try to create a function with delay and then use the function in the loop instead of Utilities.sleep(1000) directly in the loop.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  5 років тому

      You may also need to multiply the sleep amount by i to offset the timeout with each iteration.

  • @davidrutter1618
    @davidrutter1618 4 роки тому

    Great tutorial, however I'm using the below formula and when I try the script with this I keep getting an error saying SyntaxError: missing ) after argument list (line 3, file "Code.gs")
    =IF(NOT(ISBLANK(P8)),TODAY() - P8,"")
    below is what I have in the script editor
    function myFunction() {
    var ss = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
    ss.getRange("Q8").setFormula("=IF(NOT(ISBLANK(p8)),TODAY() - P8,"")");

    var lr = ss.getLastRow();
    var fillDownRange = ss.getRange(8, 17, lr-1);
    ss.getRange("Q8").copyTo(fillDownRange);

    }

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 роки тому

      Use single quotes for javascript to not interfere with formula quotes or better yet use back-ticks.
      .setFormula('formula')
      .setFormula(`formula`)

  • @RobertLongM
    @RobertLongM 4 роки тому

    Can you set this to run only on a specific sheet - and run auto?

  • @maggieadams6430
    @maggieadams6430 5 років тому

    Very helpful in setting a "fromula" (hehe). Thank you.

  • @ClintAndrew
    @ClintAndrew 4 роки тому

    Almost what I'm trying to accomplish.. I have a column of data.. starting from T4 down.. I want to enter data on T2 cell and once I press enter it copies it to the next empty cell in T column. without deleting or overwriting data already in the column. If need be create a button to run that action. I've searched and searched UA-cam and Googled it before finally commenting here.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 роки тому

      You should be able to take the logic in this video ua-cam.com/video/548dD3iXetg/v-deo.html and modify it to do what you need.

  • @garychadwick1240
    @garychadwick1240 4 роки тому

    Hi, I've been following your Script playlist and so far all have worked amazingly well which is a credit to your tuition. However, when I run this script, instead of applying the formula to my active sheet, it is applying it to the original sheet from the earlier scripts (the one with '67 High Med' etc and therefore gives an error. I know it must be something simple I've missed. Grateful for any help. Thanks for a great series!

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 роки тому +1

      When you write getActiveSpreadsheet() it refers to the spreadsheet where you started creating the script (aka tools->script editor). It is NOT the spreadsheet currently open in your browser. So make sure you write the code in the right spreadsheet script editor.

    • @garychadwick1240
      @garychadwick1240 4 роки тому

      Learn Google Spreadsheets Thanks for the instant reply. I thought it must be something like that, in which case, how do I start a new spreadsheet & script?I tried creating a completely new spreadsheet for this tutorial but it still opened up the old scripts! Thanks again for your series and your patience.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 роки тому

      If you do it from a new spreadsheet it should work. Try again.

    • @garychadwick1240
      @garychadwick1240 4 роки тому

      Learn Google Spreadsheets Thanks. It did this time. Don’t know why it didn’t before.

  • @4593san
    @4593san 3 роки тому

    How to hide the formulas in the sheet? I need only script owner to see the formulas. I created a Google sheet in which there is multiple formulas included. I want to share with my colleagues who should enter specific details in it so I gave editor access with my formulas protected only to me. But if they make a copy of my sheet all my formulas which is protected and hidden are also exposed? Can we restrict my formulas only to me, with scripts. Note : I need to give editor access too for entering specific details

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  3 роки тому

      Maybe use IMPORTRANGE function to move the data to a new spreadsheet where everybody else will be entering data.

  • @forestlandsshareholder8550
    @forestlandsshareholder8550 6 років тому

    I follow the instructions in the video. Very good thanks but I get this error when I run the script.
    Cannot find method getRange(number,number,number,number). (line 89....
    my script is
    88. var lr = ss.getLastRow();
    89. var fillDownRange = ss.getRange(2,2,lr-1,9);
    90 . ss.getRange("B2:I2").copyTo(fillDownRange);
    I have formulas programatically written into range B2:I2 then I want to copy paste those formulae down to the end of the sheet data. These formula work when I go to the spreadsheet and manually drag them down.
    It seems my system does not recognise the function getRange.
    Any ideas?

    • @derekherzog1569
      @derekherzog1569 5 років тому

      you may have chosen the wrong getRange, you need to make sure it's getRange(row, column, numRows, numColumns)

  • @vishusharma9337
    @vishusharma9337 4 роки тому

    i am using getLastRow but it returns the last row of spreadsheet.. and that is 1000 which is blank.. actually there is blank all the row after row no. 18... but result still 1000 for getLastRow

  • @joaquinpicasso4513
    @joaquinpicasso4513 5 років тому

    Very good tutorial. One question, I've got a problem with the autocomplete methods, when I start writting a method it doesn't recommend anything (Minute 3:01 example getRange). Do you know how to enable this function?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  5 років тому

      What web browser are you on? Try Firefox or Chrome.

    • @joaquinpicasso4513
      @joaquinpicasso4513 5 років тому

      @@ExcelGoogleSheets I'm currently using Brave, based on Chromium, just like Google Chrome. I will try it on Chrome now. Let me know if there is a possibility to use it on Brave too please.

  • @afiqzman
    @afiqzman 6 років тому

    if anyone encounter 'Missing ) argument list' error
    - solution to this is to insert character \ as its used to "escape" the following character which allows the " to be considered as part of the string instead of closing string out

    • @prakash52kar
      @prakash52kar 5 років тому

      Hi, I think you can help me in my problem! Please read my comment above.

  • @skippereneru823
    @skippereneru823 6 років тому

    Hi Master. I'm having difficulties in adding formula with "". Example .setformula("=if(A2="","",weeknum(A2)"

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  6 років тому +1

      What should be the final formula? First of use single quotes for javascript quotes and double quotes for formula quotes. Next make sure your formula is accurate.

  • @jfresh2054
    @jfresh2054 4 роки тому

    How to set a trigger to perform automatic?

  • @sathianarayanan6550
    @sathianarayanan6550 5 років тому

    How about =IFS"("P3=Pending", "Red",P3="Complete","Green")... function to be add, since "" used for condition and function, unable to run..

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  5 років тому +1

      use single quotes for javavascript quotes and you'll be fine.

    • @sathianarayanan6550
      @sathianarayanan6550 5 років тому

      @@ExcelGoogleSheets Perfectly worked well with condition changed to single quotes. But one more request. My spreadsheet was Form data. How to activate auto run the the script?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  5 років тому

      set triggers developers.google.com/apps-script/guides/triggers/installable Managing triggers manually

  • @danolo24
    @danolo24 4 роки тому

    what do I do if a formula has a String inside like an importrange?
    example: sheet.getRange(1,1).setFormula("importrange("docs.google.com/spreadsheets/d/....";"Sheet1!A:A")")
    the thing is that it doesnt understand the string inside the string, im thinking of splitting them or maybe import the data some other way.
    any help is appreciated :)

  • @mictralif7515
    @mictralif7515 4 роки тому

    this only works on simple formulas? what if your formula on the sheet is an array?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 роки тому

      If it's an array then there is no need to drag it down.

    • @mictralif7515
      @mictralif7515 4 роки тому

      @@ExcelGoogleSheets i mean how do i autofill?
      var ss = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
      ss.getRange("j2").setFormulas('=ARRAYFORMULA(if(MAX(IF(R[0]C[-9]=TBSS2020!R1C1:R9725C1,IF((TBSS2020!R1C2:R9725C2

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 роки тому

      @@mictralif7515 mic tralif
      Highlighted reply
      mic tralif
      25 minutes ago
      @Learn Google Spreadsheets i mean how do i autofill?
      var ss = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
      ss.getRange("j2").setFormula('=ARRAYFORMULA(if(MAX(IF(R[0]C[-9]=TBSS2020!R1C1:R9725C1,IF((TBSS2020!R1C2:R9725C2

  • @paula.jimenez9092
    @paula.jimenez9092 4 роки тому +1

    Hello! Great tutorials!! I would to ask for some specific questions, dou you have any email or similar where I can send you a direct question? Thank u in advance

  • @fherschulz
    @fherschulz 5 років тому

    somebody knows how to save data from a form into another sheet, like a data sheet where I can save a sale, for example

    • @tomsawkins9828
      @tomsawkins9828 4 роки тому

      Fher use this
      function SendTheDailyJobNumbers() {

      var spreadsheet = SpreadsheetApp.getActive();
      spreadsheet.setActiveSheet(spreadsheet.getSheetByName('PrepSheet'), true);

      spreadsheet.getRange('add range').activate();
      // *** Have to figure out how to make the target a different document!!!! ***
      var target = SpreadsheetApp.openById("Add Your Sheet ID here");

      /*
      Next we need to pick the particular sheets within those spreadsheets.
      Let's say your row is on the sheet named "prepsheet", and you have a sheet in the target spreadsheet named "D2D Daily Job Numbers".
      */
      var source_sheet = spreadsheet.getSheetByName("PrepSheet");
      var target_sheet = target.getSheetByName("D2D Daily Job Numbers");

      // The below makes the highlighted cells the range that will be copied.
      var source_range = source_sheet.getActiveRange();
      var last_row = target_sheet.getLastRow();
      var values = source_range.getValues();
      target_sheet.getRange(last_row + 1, 1, values.length, values[0].length).setValues(values);
      spreadsheet.getRange('A2').activate();
      }

  • @siralexander6055
    @siralexander6055 5 років тому +1

    i love u

  • @davidnunes299
    @davidnunes299 6 років тому +1

    #Feedback
    Is there a way for you to create a button to run that function? I think so. It would be more interesting if you start your videos showing us the functions working first then you teach us. It would be more interesting.
    Thank your for all your video lessons!

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  6 років тому

      That's something I've covered in many videos. You can see an example of that by the end of this video ua-cam.com/video/ZcNmur6xiX4/v-deo.html

    • @estonhumphrey2911
      @estonhumphrey2911 6 років тому

      Hey, there is a way to create a button to run your script.
      First, create a button, you can do this by clicking Insert -> Drawings, then create a shape! once you click save and close, a shape will pop up.
      Next, you can assign the script to the shape. Click the shape and then the three dots on the upper right of the shape then click assign script, in the propt box enter the name of the function (to run this video's example you would enter: myFunction).
      Hope that helps

  • @YoungHumanClub
    @YoungHumanClub 4 роки тому

    var ss = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
    ss.getRange("D2").setFormula("=A2+B2");
    var lr = 100000;
    var fillDownRange = ss.getRange(2, 4, lr-1);
    ss.getRange("D2").copyTo(fillDownRange);

  • @raygilbertflies
    @raygilbertflies 5 років тому

    Yeah, doesn't work. Nothing seems to work reliably on google sheets

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  5 років тому

      Not sure what you mean. It's been working fine for years.

  • @johnn4314
    @johnn4314 6 років тому +1

    Dont feel obligated to answer Ive already got so much from the videos

  • @wellwashworks9020
    @wellwashworks9020 5 років тому

    how to do in this type of formula "=IF(A2="","",IF(A2="Hotel Arizona Inn",DATA1!$D$2,IF(A2="Tulsi Motel",DATA1!$D$3,IF(A2="Dev Motel",DATA1!$D$4,IF(A2="Ravi Residency",DATA1!$D$5,"")))))"

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  5 років тому

      Just use single quotes for javascript and put the formula in '=IF(A2="","",IF(A2="Hotel Arizona Inn",DATA1!$D$2,IF(A2="Tulsi
      Motel",DATA1!$D$3,IF(A2="Dev Motel",DATA1!$D$4,IF(A2="Ravi
      Residency",DATA1!$D$5,"")))))'

    • @wellwashworks9020
      @wellwashworks9020 5 років тому

      @@ExcelGoogleSheetsthank you

  • @jaydalal99
    @jaydalal99 4 роки тому

    Struggling with trying to write a script to paste templates on sheets based on whether checkboxes are ticked, is there a way to do it?
    The logic is
    If A1 is “TRUE” on sheet 1
    Find an A1:B5 which is on sheet 2
    Paste this A1:B5 on sheet 3
    In the next blank cell after 3 in the column A
    And this repeats for A1 to A10 on sheet 1
    Any help is appreciated