How to Auto Sort your Google Sheet

Поделиться
HTML-код
  • Опубликовано: 5 окт 2024
  • Welcome to Community Support - where you can get help with hurdles you're facing while bootstrapping your company or trying to find new ways to increase your efficiency and up your game at work.
    In this video, I'm going to show you how you can use the onEdit(e) trigger to auto-sort your spreadsheet every time someone sets a checkbox to true.
    Check out the rest of our Community Support videos. You might find a video that addresses a hurdle that you're facing today! - • Community Support
    🔔 Subscribe for more tips just like this: www.youtube.co...
    ======= KEEP LEARNING WITH Bootstrapping Tools =======
    🎬 MOST RECENT VIDEOS: / bootstrappingtools
    🤖 Automate with Google Apps Script: bit.ly/Bootstr...
    💻 Build-Through Videos: bit.ly/Bootstr...
    🚑 Community Support Videos: bit.ly/Bootstr...
    🚀 Check out some of our written content: bootstrapping....
    ======================================================
    👥 Looking for something specific? feedback@bootstrapping.tools
    ======================================================
    💝 Support our channel 💝
    Buy us a coffee: ko-fi.com/boot...
    Or by tipping: koji.to/k/6wBv
    ======================================================
    #Bootstrapped #GoogleSheets #GoogleAppsScript

Комментарии • 24

  • @aidenx4209
    @aidenx4209 2 года назад +1

    Super helpful! Only issue i ran into was autofill filling "value" instead of "values"

  • @huzaifakhan3363
    @huzaifakhan3363 2 года назад +1

    this video is great tbh

  • @alankaramnarayanan6331
    @alankaramnarayanan6331 2 года назад +1

    Hey, thanks for this! It was working till we got to the event (e) part. From there I started getting the error 'TypeError: Cannot read property 'source' of undefined'
    How do I fix it?

    • @BootstrappingTools
      @BootstrappingTools  2 года назад +1

      You're definitely not the first person to run into this issue - so much in fact that my next video is going to talk ALL ABOUT triggers :)
      Long story short though is that the "event" will only be available when you trigger the code through an action on the spreadsheet. So for instance, if you are using an onEdit(e) trigger, you need to make an edit on your spreadsheet which will auto-execute that function and pass along that event which you'll be able to reference with "e" (assuming you kept the function parameter as "e")
      Once it fires, you'll be able to see what happened (and troubleshoot it) through the execution logs tab. It helps to add a bunch of console.log() statements when troubleshooting since you can't use the debugger for triggered events.
      Hope this helps!

  • @dkelsch9567
    @dkelsch9567 8 месяцев назад +1

    I have multiple pages on 1 sheet, as a shopping list, the 1st sheet doesn't auto sort but the 2nd sheet works just fine? I copied and pasted the code from the 1st page for the 2nd page, at first the 1st page worked but then I exited out of google spreadsheet and the apps script, and when I went back in, it stopped working for the 1st page, but the 2nd page still works... how do I fix it?

    • @BootstrappingTools
      @BootstrappingTools  8 месяцев назад

      Is your shopping list in sheet 1 a formula or is it just regular data you've directly entered into it?
      It might have to do with the parameters you're using in the method/function call.
      Check out this code snippet page with some more context around auto-sorting an entire sheet: bootstrapping.tools/code-snippets/auto-sorting-your-google-sheet/

  • @smaccsi
    @smaccsi 2 года назад +1

    If I wanted to autoSort multiple sheets inside the spreadsheet all with different last columns, would I need to code for each sheet?

    • @BootstrappingTools
      @BootstrappingTools  2 года назад

      You don't need to repeat the code for each sheet, but you would want to create a separate function for sorting that takes in parameters for the sheet name and column you want to sort by.
      From there, you'll just need to figure out how you want to sort each sheet and call the new function for each sheet you want to sort.

  • @tylerdow711
    @tylerdow711 8 месяцев назад

    Is there a way that you can sort a certain area? (E.X: D38:D52, gets sorted but the other areas don't be sorted.)

    • @BootstrappingTools
      @BootstrappingTools  8 месяцев назад

      I got you 😉
      bootstrapping.tools/code-snippets/auto-sorting-a-specific-google-sheet-range/

  • @hannahtepoorten3636
    @hannahtepoorten3636 2 года назад +1

    Hi Im getting an issue stating The coordinates of the range are outside the dimensions of the sheet.

    • @BootstrappingTools
      @BootstrappingTools  2 года назад

      Hi Hannah! Thanks for reaching out.
      That error typically happens if your sheet doesn't have as many rows/columns as what you're requesting from the getRange() function.
      What are the parameters you're passing through in getRange()?
      Feel free to shoot an email to feedback@bootstrapping.tools if you'd rather share those details in more private space.

  • @temurkhan9601
    @temurkhan9601 Год назад +1

    brosther, how can i add several ranges using this formula ?

    • @BootstrappingTools
      @BootstrappingTools  Год назад

      If the ranges are all separated and in different locations, you'll have to repeat the code.
      If they're all in the same area, you can just add onto the sort() method to sort by multiple variables.

  • @AxIIpro
    @AxIIpro Год назад +1

    Error TypeError: The comparison function must be either a function or undefined.
    Colaboración, por favor!

    • @BootstrappingTools
      @BootstrappingTools  Год назад

      Hard to say what the issue is without seeing the code. Feel free to email support@bootstrapping.tools

  • @temurkhan9601
    @temurkhan9601 Год назад +1

    thank youy

  • @vishalthakral1470
    @vishalthakral1470 2 года назад +1

    can you please share sheet to me which you created?

    • @BootstrappingTools
      @BootstrappingTools  2 года назад

      Hi Vishal, are you looking for the code or for the spreadsheet?