/** | |
* This Google Sheets script keeps data in the specified column sorted any time | |
* the data changes. | |
* | |
* After much research, there wasn't an easy way to automatically keep a column | |
* sorted in Google Sheets, and creating a second sheet to act as a "view" to | |
* my primary one in order to achieve that was not an option. Instead, I | |
* created a script that watches for when a cell is edited and triggers | |
* an auto sort. | |
* | |
* To Install: | |
* 1. Open your Google Sheet. | |
* 2. Navigate to Tools > Script editor… | |
* 3. Copy and paste this script in the editor. | |
* 4. Change the three constants at the start of the code below to reflect | |
* your preferences. | |
* - Note: My goal is to move these settings to a GUI and have this script | |
* be installable as an add-on. | |
* 5. Give the script a name (e.g. "Keep Data Sorted") and hit save. | |
* | |
* To Use: | |
* Simply edit your Google Sheet like normal. Any time you edit data in your | |
* sort column (specified in `SORT_COLUMN_INDEX`), the script will re-sort | |
* your rows. | |
* | |
* If you are having trouble getting it to work, try the following in order: | |
* 1. Reload your spreadsheet. | |
* 2. Open the script editor (Tools > Script editor…), click the "Select | |
* function" dropdown, choose `onInstall`, and hit Debug (the bug icon | |
* that precedes the dropdown). | |
* 3. If that doesn't work, reach out via GitHub (link below) and ask for | |
* help. You may also find that others have run into the same issue | |
* and have already posted a solution. | |
* | |
* @author Mike Branski (@mikebranski) | |
* @link https://gist.github.com/mikebranski/285b60aa5ec3da8638e5 | |
* | |
* @OnlyCurrentDoc Limits the script to only accessing the current spreadsheet. | |
*/ | |
// The numeric index of the column you wish to keep auto-sorted. A = 1, B = 2, | |
// and so on. | |
var SORT_COLUMN_INDEX = 2; | |
// Whether to sort the data in ascending or descending order. | |
var ASCENDING = false; | |
// If you have header rows in your sheet, specify how many to exclude them from | |
// the sort. | |
var NUMBER_OF_HEADER_ROWS = 1; | |
// No need to edit anything below this line for general use. | |
// Make an improvement? Ping me on GitHub and let me know! | |
// Keep track of the active sheet. | |
var activeSheet; | |
/** | |
* Automatically sorts on the pre-defined column. | |
* | |
* @param {Sheet} sheet The sheet to sort. | |
*/ | |
function autoSort(sheet) { | |
// Get the entire set of data for this sheet. | |
var range = sheet.getDataRange(); | |
// Then, if there are any header rows, offset our range to remove them from | |
// it; otherwise, they will end up being sorted as well. | |
if (NUMBER_OF_HEADER_ROWS > 0) { | |
// Setting the second parameter of offset() to 0 to prevents it from | |
// shifting any columns. Note that row headers wouldn't make much | |
// sense here, but this is where you would modify it if you | |
// wanted support for those as well. | |
range = range.offset(NUMBER_OF_HEADER_ROWS, 0); | |
} | |
// Perform the actual sort. | |
range.sort( { | |
column: SORT_COLUMN_INDEX, | |
ascending: ASCENDING | |
} ); | |
} | |
/** | |
* Triggers when a sheet is edited, and calls the auto sort function if the | |
* edited cell is in the column we're looking to sort. | |
* | |
* @param {Object} event The triggering event. | |
*/ | |
function onEdit(event) { | |
var editedCell; | |
// Update the active sheet in case it changed. | |
activeSheet = SpreadsheetApp.getActiveSheet(); | |
// Get the cell that was just modified. | |
editedCell = activeSheet.getActiveCell(); | |
// Only trigger a re-sort if the user edited data in the column they're | |
// sorting by; otherwise, we perform unnecessary additional sorts if | |
// the targeted sort column's data didn't change. | |
if (editedCell.getColumn() == SORT_COLUMN_INDEX) { | |
autoSort(activeSheet); | |
} | |
} | |
/** | |
* Runs when the sheet is opened. | |
* | |
* @param {Object} event The triggering event. | |
*/ | |
function onOpen(event) { | |
activeSheet = SpreadsheetApp.getActiveSheet(); | |
autoSort(activeSheet); | |
} | |
/** | |
* Runs when the add-on is installed; calls onOpen() to ensure any initializion | |
* work is done immediately. | |
* | |
* @param {Object} event The triggering event. | |
*/ | |
function onInstall(event) { | |
onOpen(event); | |
} |
This comment has been minimized.
This comment has been minimized.
Hi Mike, Your amazing script used to be working like a charm but suddendly i keep having an error "Service error: Spreadsheets" when I run onInstall function. Do you have any clue on what's not working? Thanks a lot |
This comment has been minimized.
This comment has been minimized.
Is there a way to sort by a column then another? I want the data in column 4 in order then of that result the data in column 10 sorted. var SORT_COLUMN_INDEX = 4 (then 10); Thanks in advance. |
This comment has been minimized.
This comment has been minimized.
I have the same question as dmsig85, normally I have to sort 2 columns on a sheet by using DATA\Sort range then select "Data has header now" I select the header in "sort by" and select "Z -> A" then "then by" next header then "A -> Z". |
This comment has been minimized.
This comment has been minimized.
I also get "Service error: Spreadsheets". Hm... what to do |
This comment has been minimized.
This comment has been minimized.
Would it be possible to also have this resort when a new row is entered? Not just when an existing cell is edited? (IE if this was pulling in information from Typeform via Zapier? |
This comment has been minimized.
This comment has been minimized.
Waiting for your answeeeerr pleaseee :) |
This comment has been minimized.
This comment has been minimized.
Whoa, I never received notifications for any of these comments! @doublevv, @cheekygit That sounds like a permissions issue with your sheet or a service error of some kind from Google. Either way I just checked the script I'm using this on and it's still sorting and saving fine. @dmsig85, @JohnCRT No idea on sorting by multiple columns, unfortunately. I haven't tried doing that, but I would just try calling @BriceMilano This was my first Google Script, but I'd imaging there's an event for when a new row is added. Check Google's documentation, but if one exists it should be able to be added to this script to work how you'd like. @mix3d So glad you found it useful! |
This comment has been minimized.
This comment has been minimized.
@mikebranski, @dmsig85, @JohnCRT Sorting multiple columns is possible, but calling this function more than once won't produce the desired results. It would only result in the table being sorted according to the last call.
To sort on multiple columns would require a specialized function, such as this one.
|
This comment has been minimized.
This comment has been minimized.
Thanks for this script! |
This comment has been minimized.
This comment has been minimized.
Maybe I'm not running the script correctly, but is it possible to have the sorting take place only after that row is de-selected? Currently what's happening is I'm adding a row of data from left to right (the left-most cell being the one that I edit first, and the one that the sorting is anchored upon) and by the time I get to the last cell I want to edit/add to, the row gets sorted and "disappears" for another part of the sheet. |
This comment has been minimized.
This comment has been minimized.
Hey, I am getting an error when setting the column to be sorted to 5 (E). But my sheet has the timestamp column in E, so I need it sorted there.
|
This comment has been minimized.
This comment has been minimized.
fyi, for those interested in only sorting a range rather than the whole sheet, change: |
This comment has been minimized.
This comment has been minimized.
I've tried this on a very simple sheet and it works fine, but on something more complicated (with formulas and different sheets) it doesn't appear to work. |
This comment has been minimized.
This comment has been minimized.
If 'SORT_COLUMN_INDEX' is in anyway the result of a formula, changes are not detected and the spreadsheet gets not (re)sorted. I can trigger the sorting function by editing the formula (netto not changing anything) but I would like to avoid this action. So when I type numbers in 'SORT_COLUMN_INDEX' or produce them with a formula the sorting function works. But when the formula's automatically do their work (producing numbers in the column), it does not work. Is there a solution for this problem? André |
This comment has been minimized.
This comment has been minimized.
Wondering how I could edit this to only look at 1 specific sheet instead of the activesheet? I only want to sort 1 sheet of a multi-sheet spreadsheet. Seems like it would have something to do with the getactivesheet() function, and changing this to the name of the sheet I would like the sort to apply to. any help would be appreciated. Thanks!! |
This comment has been minimized.
This comment has been minimized.
Thanks so much! It would be nice if there were an easy way to trigger the function other than just editing a cell. I Have formulae entered, so the cells are updating automatically, and therefore not triggering the sort. |
This comment has been minimized.
This comment has been minimized.
This is great. Thank you for your contribution. Is there a way to have this sort script work by having to click on a button versus having the sort auto triggered by a cell entry? I am new to Google scripting so I apologize if what I'm asking for is something simple. Thank you again. |
This comment has been minimized.
This comment has been minimized.
Hello, I am sure my issues stem from the fact that I know very little about scripts...but I am trying to use one to automatically sort the contents of a GSheet that is populated from a GForm. I have copied the entire text of the script that mikebranski posted, but as that only accounts for the sorting of a single column, I have replaced the following portion: With this updated information from @IanAtkin: With my desired sort criteria here is the actual edit I made to the script: But not matter what I input (I have one headder row and want to sort first by column B, then by Column A (ultimately I want to sort by three columns, but I'll get this working first) I get an error when trying to save the script. Any help that any of you can give will be greatly appreciated! |
This comment has been minimized.
This comment has been minimized.
@sparzatka this post has a script that will create an additional menu item called "Sort" that will sort according to your specifications, but only when you click on the menu item, not automatically. The script is set up to sort according to multiple columns, but it'd be easy to modify it to sort only one if that's what you want. (full disclosure, I'm not the author of the script!) |
This comment has been minimized.
This comment has been minimized.
@IanAtkin You're right. I had the need for a dual sort and looked into it this week. I may play around with it some more and update the script. @andrewkmin Totally get what you're saying. My original use case for this script wasn't as affected by this issue, but it's something I want to address now. I'm going to see if I can add a blur event listener when the targeted columns are modified and only sort then. @dukeblue2017 You can modify which cell(s) triggers the sort, but as I said above I'd like to make that more flexible. @sdirghalli You're receiving an error because you have invalid syntax. // This:
range.sort( {
{column: 4, ascending= true},
{column: 3, ascending= true},
{column: 2, ascending= true},
} );
}
// Should be this:
range.sort( {
{column: 4, ascending: true},
{column: 3, ascending: true},
{column: 2, ascending: true},
} );
} Thanks for the feedback everyone! |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
@mikebranski Thanks for this script, very helpful. One issue: if NUMBER_OF_HEADER_ROWS is greater than 0, when I run the script I get this error:
I fixed this by updating line 72 to the following:
(cc @bsebastian86) |
This comment has been minimized.
This comment has been minimized.
To sort by 2 or more columns follow this: brackets are important, and define the variables on top, or specify the column number directly.
|
This comment has been minimized.
This comment has been minimized.
Ok, so weird question, I have been struggling with this one for a couple days now. |
This comment has been minimized.
This comment has been minimized.
Nicely done @mikebranski |
This comment has been minimized.
This comment has been minimized.
Btw for everyone who is asking on how to do sorting on a specific sheet only, change this from line 26 Here X is the sheet name you want |
This comment has been minimized.
This comment has been minimized.
Well, it sorts by the numeric value in a cell, not by the time modified. Is there any way to sort by the time modified? |
This comment has been minimized.
This comment has been minimized.
@adityarao310 are you sure you meant line 26? thanks |
This comment has been minimized.
This comment has been minimized.
Thank you!! |
This comment has been minimized.
This comment has been minimized.
Thank you - this has really helped me with a Google Sheets Gradebook I have been adapting to collate marks from multiple Google Forms Quizzes. |
This comment has been minimized.
This comment has been minimized.
Thank you very much, it is really helpful. Thank you in advance |
This comment has been minimized.
This comment has been minimized.
Will this work if the data to be sorted is text/string? |
This comment has been minimized.
This comment has been minimized.
@VitalyPitt That's not something I've tried doing, but let me know if it works! @lucalo4 I don't see why you couldn't do that. You can add more variables (or a mapping) and switch which gets used based on the current sheet. @remedcu Yeah, no reason it shouldn't work with strings. It's just calling the |
This comment has been minimized.
This comment has been minimized.
Thanks mike, here is my question: Your auto sort function performs really good for the main sheet. Because everytime I open the spreadsheet, the price values refresh and the auto sort column function good. Thank you in advance. Regards from Switzerland. |
This comment has been minimized.
This comment has been minimized.
Thank you! This was super helpful!! |
This comment has been minimized.
This comment has been minimized.
Thanks a lot...very helpful indeed. While currently I've used an add-in for emailing this sheet to myself each day when due date is active...but if someone can suggest a modified script which can also send email to a customizable email address (or the one in Col 3)- so it shd. send email (1 or 3 days - customizable) before when date is due (in Col 1) and also paste in body of email all the rows (descriptions from col 2) where Col 1 date is equal or less than the current date- wud be great. Thanks. |
This comment has been minimized.
This comment has been minimized.
Thanks for your work on this script! Have you got any ideas on how to make it sort rows based on values generated by a formula? Your script could potentially save me loads of time - I run my project management using sheets and often need to group stuff based on status. Here's what I've done and what I want to do: =if(A6=0, , IFS(A6="Ideas", 1, A6="Backlog", 2, A6="To do", 3, A6="Sprint", 4, A6="In Progress", 5, A6="Review", 6, A6="Done", 7)) Each time I change the value in A6 (or any other row), say from Ideas to In Progress, column B6 then changes from 1 to 5. This lets me sort items quickly without having to drag them around (and disappear into the space-time vortex that is dragging in sheets). I found your script to help me manage the info live without having to go through the process of creating a filter to exclude the headers then hitting sort A-Z. However, the script doesn't appear to work when there values to be sorted are created by a formula. Any chance of working around this? Sheets seems to be able to do it, albeit a schlep. Thanks in advance! |
This comment has been minimized.
This comment has been minimized.
Hello |
This comment has been minimized.
This comment has been minimized.
@mikebranski , thanks for the code. I've followed (I think) the modifications that you and @IanAtkin suggested to allow sorting of multiple columns, but keep receiving an error when saving:
Line 77 is the first line calling out column 4 in the code snippet, below. No other changes were made to the original script.
What is this noob missing that is keeping the script from running properly? My sheet is a simple database of real estate parcels that I want to organize by City, Neighborhood, Street, and Street Number. Manually re-sorting after each batch of new entries (via a Google Form) is a time killer for me. Also, I want coworkers who are tech illiterate to be able to add a parcel from the form and then view the associated sheet already sorted. Thanks for any help you might be able to offer. |
This comment has been minimized.
This comment has been minimized.
I keep getting an error message when I run the autosort TypeError: Cannot call method "get DataRange" of undefined. (line 63, file "Keep Data Sorted") Can you help? |
This comment has been minimized.
This comment has been minimized.
This has helped me tremendously! The only issue I have run in to is having multiple sheets and the script affecting each one. I only want it to alter 2 out of the six sheets. Tried to figure it out myself but having no luck. Would appreciate a suggestion if you have time :) |
This comment has been minimized.
This comment has been minimized.
no matter what i do i still get the
|
This comment has been minimized.
This comment has been minimized.
I had the same error and this worked perfectly. Thanks @peterhartree. |
This comment has been minimized.
This comment has been minimized.
Thank you! This works perfectly! |
This comment has been minimized.
This comment has been minimized.
Hi Mike, this is both my first time using GitHub and Excel/GoogleSheets macros so bear with me. I am using your script to automatically sort a sheet that will be updated every week. The sheet is basically done but for some reason some values are not being sorted and some are. The values that are guiding the sorting are the product of sums, so they are formulas in themselves. Did you happen to debug this in the past? It works almost perfectly, but some lines simply are left behind :( |
This comment has been minimized.
This comment has been minimized.
Luca, did you ever get a solution for this? I myself am doing something very similar, and have 4 sheets from 10 that I need to auto sort... Cheers |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
I'm having a hard time figuring out where this is supposed to be inserted, as it doesn't make sense at the current line 26. Has anyone figured it out? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
First off, huge thanks @mikebranski for this very nifty script. I created an account on GitHub specifically to thank you. It helped me out of a bind as I'm not a developer, just someone trying to hack my way through and getting the blinking machine to do what I want it to for admin tasks. Those interested in a) restricting the sorting function to a single sheet and b) setting a time-driven trigger read on: a) One Sheet Only@theghostlymeow i.e.
b) Time Driven Trigger@mgutscher1 Managing triggers manually
|
This comment has been minimized.
This comment has been minimized.
Hi @mikebranski, Love this script. Thank you. But is there a way to make it sort data in a column that is a result of a formula. It works fine if, for example, I type in a number such as "4" or or "any number" in to a cell. The problem is when all the cells that make up a column are derived from a formula (regardless of how simple or complex) such as "=ADD(C5,D5)" or even "=C5" Is there a way to make the script sort the values in a column when those values are derived from a formula? Thank you, --Jody |
This comment has been minimized.
This comment has been minimized.
Hello @mikebranski, Thank you! |
This comment has been minimized.
This comment has been minimized.
I have a slightly different issue having to do with Zapier. Zapier adds a row at the BOTTOM of my sheet, but I'd like to have the row added to the TOP of the sheet based on date added. Your function works beautifully for me if I manually enter a date into the date field. I have it programmed in reverse order so that the newest date is always on top. If I manually add a new date to the bottom of the sheet, the auto sort automatically sorts the spreadsheet in the right order. Now with Zapier, the zap that I created that imports data from Mailchimp creates the new row at the bottom of the sheet as expected, but what doesn't happen is the auto sorting to move it to the top. I think it has to do with the entry not being manually changed. Zapier creating an entire new row somehow doesn't trigger the onEdit (e) function, even though the field value DID change. Do you have any advice on how to trigger the sort if the data gets imported with another script and not manually altered, i.e. with Zapier? |
This comment has been minimized.
This comment has been minimized.
@sinethieme Hey! It looks like |
This comment has been minimized.
This comment has been minimized.
@didame13 Super late reply - GitHub just started sending notifications for new gist comments (finally, yay!). It sounds like you want to sort your column normally, but then grab certain special values and move just those rows to the bottom? So something like this:
A quick and dirty way would be to search your search for rows containing the special value after the sort happens, and manually move them to the bottom programmatically. You'd need to check the docs for how to move a row, but it should be doable. Otherwise, supposedly (just did a quick search) you can use filter views to achieve what you want, but I don't have any experience with them. |
This comment has been minimized.
This comment has been minimized.
This is great! I think this is working for the most part except I am using it in conjunction with a Google Form. When data comes in from the form it goes to the bottom of the set and seems to stay. But if I type something in a cell in the column I want sorted it then re-sorts everything as it is supposed to. Does the Google Form entry method somehow not trigger the "activecell" part of the code? If so, is there some workaround for this? Can it just be set up to re-sort at a certain time or two each day? It would be a little wonky that way but it still might work for my need. |
This comment has been minimized.
This comment has been minimized.
@Adidas88 You can test the active cell theory by commenting out the Otherwise you could set up an installable trigger to call the sort for you, such as when you open the document or every few hours (no more frequently than once an hour, though). |
This comment has been minimized.
This comment has been minimized.
How do we sort from more to less? |
This comment has been minimized.
This comment has been minimized.
@siha2020 It's documented on line 44: // Whether to sort the data in ascending or descending order.
var ASCENDING = false; |
This comment has been minimized.
This comment has been minimized.
hey @mikebranski Really appreciate your work on this. I have 2 questions I'm trying to find answers to.
Thanks! |
This comment has been minimized.
This comment has been minimized.
I think you'd need to change all instances of
I originally wrote this to sort dates, so it definitely works on them. Perhaps there's an issue with the raw data in your cells (possible) or the way they are formatted (unlikely), but I didn't encounter that myself. What do you mean by "This appears to only be editing numbers."? |
This comment has been minimized.
This comment has been minimized.
Hi @mikebranski I actually tried your last code, with getSheetByName, and it works just fine. I am trying to autosort 2 specific sheets, not familiar with google docs code, what do i put into ("Name Your Sheet") to use the autosort on 2 sheets? I.e ("sheet 1","sheet 2")?? Thanks |
This comment has been minimized.
This comment has been minimized.
Super useful thanks for sharing this! Couple of comments: It is easy to manually add additional columns to the sort on line 76 per this: https://developers.google.com/apps-script/reference/spreadsheet/range#sortsortspecobj Found a bug ... if you do not have any empty rows at the bottom of your sheet the code throws this error: "The coordinates of the range are outside the dimensions of the sheet." I would suggest tweaking the range offset so it only modifies the starting row instead of the whole range to fix this. Also if anyone is wanting to NOT have the auto-sort apply to just one tab of their sheet, I made this small tweak: function onEdit(event) { // Update the active sheet in case it changed. // Only trigger a re-sort if the user edited data in the column they're Note that if the active sheet doesn't have the column SORT_COLUMN_INDEX or you never edit that column, the onedit won't run at all, which is great. |
This comment has been minimized.
This comment has been minimized.
I am attempting to use a Google Form to create a Google Sheet to do list. I input info into my form, which then is viewable in the sheet. The info includes the task, a due date, notes, a checkbox, etc. Whenever I open the sheet, I'd like to view the tasks in chronological order according to due date (that is, the nearest due date first and the furthest due date last). I'd like to create a script for this. I have this: function onOpen(event) {
Thank you! |
This comment has been minimized.
This comment has been minimized.
i am getting an error " Cannot read property 'getActiveRange' of undefined " |
This comment has been minimized.
This comment has been minimized.
How do I sort numbers numerically instead of alphabetically in google sheets? @mikebranski The script works perfectly but it does this: So it sorts them like Z-A, but I need them to be from > to < |
This comment has been minimized.
This comment has been minimized.
First of all, thank you @mikebranski for this. I am an educator and with remote learning in effect, I have definitely made use of some new functions and wowed some colleagues. I see a lot of comments regarding the fact that it does not auto sort when the cells have a produced any value from a formula. I was wondering if you (or anyone) has any idea on how to have it auto sort without me having to constantly put data in, have the formula do its thin (just=sum) and refresh so the sort column updates appropriately. Again, thank you so much for this. It's been a lifesaver. |
This comment has been minimized.
This comment has been minimized.
@mikebranski Thanks a ton for making this, man!
Again, thanks for your work! Using this for budgeting but haven't been able to find answers to the first 2 questions. |
This comment has been minimized.
This comment has been minimized.
@mikebranski This has been a big help keeping data added to an inventory sheet sorted by category when I was editing the category from a drop down list. Now that I am pulling the category via formula from another sheet, it no longer automatically sorts? I saw that someone on here had commented about it only working with numbers? It's sorting by names fine, but only when I refresh the sheet, not automatically? I did your script update to keep the sorting to only one tab in my workbook and now it's not working the same? |
This comment has been minimized.
This comment has been minimized.
Hi @mikebranski , how do I exclude the last row from the sort because I have numbers to total at the last row. |
This comment has been minimized.
This comment has been minimized.
Hi Mike, TypeError: Cannot read property 'getDataRange' of undefined (line 63, file "Code")Dismiss I would appreciate you if you can help me out! |
This comment has been minimized.
This comment has been minimized.
I found that if you go to script editor after installing this script you can go to file>new>script file you can run the script a second time changing the date ie in the first fill out for column 10 then the second script run for column 4 I hope this helps! |
This comment has been minimized.
This comment has been minimized.
Hello im getting an error that says "invalid: input must fall between specified range" and dont know how to fix it. the goal is to auto sort the column (that has drop down lists) as the user selects an option. i used data validation to make the drop down list and also conditional formatting to color the cell. i dont know if those are whats causing the problem. please help if you can. if i need to change anything in the script to make it work let me know. |
This comment has been minimized.
This comment has been minimized.
Hi Mike! TypeError: Cannot read property 'getDataRange' of undefined |
This comment has been minimized.
This comment has been minimized.
Hi sir Mikebranski, Thank you so much for this splendid script. I used it in my sheet, unfortunately it shows this error - "TypeError: Cannot call method "getDataRange" of undefined. (line 63, file "Code")." Please help me on this. Thank you, Regards. |
This comment has been minimized.
This comment has been minimized.
Hi Mike! I am getting the same errors as @@Jppdiza. I tried the problem solving steps you shared, but now I am getting the error "TypeError: Cannot read property 'getDataRange' of undefined (line 63, file "Copy of Code")". I'm not sure if this is because the sheet is owned by someone else? However, I do have editing rights. Happily, the formula did work on a sheet that I am the owner of! |
This comment has been minimized.
This comment has been minimized.
Hi Mike and Everyone here! We are trying use =arrayformula(C3:C-D3:D-E3:E) this with your script and it only works if we run them seperately. Any way to use them together ? |
This comment has been minimized.
This comment has been minimized.
Hi Mike and those of you following this thread. I started using your script yesterday and all seemed great (thanks by the way) but now when it runs for some reason it will insert 11 new rows above the data and then lose the sort??? I am using the script to sort data from a Google Form that has already been filtered into "grade level" sheets from the form source sheet. Any ideas why it works and then suddenly inserts 11 new rows? |
This comment has been minimized.
This comment has been minimized.
Hello, this is very helpful thank you for your work. SHEET_NAME = "PRE BIDS"; function onEdit(e){ Thank you for taking the time to advise. |
This comment has been minimized.
all the other SO forum posts never worked. This saves the day!