google-sheets-formula

google sheets calulation latency and dependant function calls

柔情痞子 提交于 2019-12-02 15:21:31
问题 Here is a function that pupulates a column with a formula: function fillAccount(lastRow) { var spreadsheet = SpreadsheetApp.getActive(); spreadsheet.getRange('B1').activate(); spreadsheet.getCurrentCell().setValue(' '); spreadsheet.getRange('B2').activate() .setFormula('=ifna(vlookup(C2,Accounts!$A$1:$A$7,1,false),B1)'); spreadsheet.getRange('B3').activate(); var currentCell = spreadsheet.getCurrentCell(); spreadsheet.getRange('B3:B' + lastRow).activate(); spreadsheet.getRange('B2').copyTo

Looping through a set of google sheet values

女生的网名这么多〃 提交于 2019-12-02 13:42:53
I have 2 sets of data. One is tank names Tank Name A1 A2 B1 B2 and the next is ON/OFF Data ON/OFF 0 1 1 1 1 1 0 0 1 1 1 1 1 1 1 0 0 1 1 1 0 1 1 Now the result I am looking is, when the ON/OFF is 1 then the first tank is to be mentioned: when it's 0, no tank to be mentioned. Once all the tanks are mentioned,then it should again start from the first tank ie A1.But if 0 comes in between then it should start again from A1 .. like this Result expected 0 1 A1 1 A2 1 B1 1 B2 1 A1 0 0 1 A1 1 A2 1 B1 1 B2 1 A1 1 A2 1 B1 0 0 1 A1 1 A2 1 B1 0 1 A1 1 A2 You can check the google sheet here : Scenario 2

VLOOKUP multiple times from one row/cell

。_饼干妹妹 提交于 2019-12-02 09:59:38
I am trying to create a sign-up sheet using Google Forms for parents to fill out. Parents have the ability to sign up multiple children in one form. For it to be easier to read I have organized the entries using: =sort(unique({A2:B999;C2:D999})) Now I want to pull the emergency contact information from the submission but for some reason my VLOOKUP can only pull it up for the first child. Here is the simplified response sheet: [goo.gl/soE1PG] Pass the lookup off to a second VLOOKUP function with IFERROR function if the first fails. In I5 as, =IFERROR(VLOOKUP(G5, A:E, 5, FALSE), VLOOKUP(G5, C:E,

google sheets calulation latency and dependant function calls

自作多情 提交于 2019-12-02 08:17:05
Here is a function that pupulates a column with a formula: function fillAccount(lastRow) { var spreadsheet = SpreadsheetApp.getActive(); spreadsheet.getRange('B1').activate(); spreadsheet.getCurrentCell().setValue(' '); spreadsheet.getRange('B2').activate() .setFormula('=ifna(vlookup(C2,Accounts!$A$1:$A$7,1,false),B1)'); spreadsheet.getRange('B3').activate(); var currentCell = spreadsheet.getCurrentCell(); spreadsheet.getRange('B3:B' + lastRow).activate(); spreadsheet.getRange('B2').copyTo(spreadsheet.getActiveRange(), SpreadsheetApp.CopyPasteType.PASTE_FORMULA, false); } There is some latency

Query one table and output data into multiple columns

柔情痞子 提交于 2019-12-02 04:57:56
Simply put I am trying to take a single column query result and output it into a 5 wide by × long table. This is how the main table is organized. On separate tabs, I want to list all of the caught and seen Pokemon on their own for easy search. While I can get it to output something like this with =query(NatDex, "Select C Where F <> ''",1) I would like it to output the data something like this for easy reading so it's not eventually 100+ entries long: Bonus points if you can give me formula/something to do it where I can vary how wide the second table is. But this is far less important to me. I

Need to delete an entire row based on one cell's criteria

我怕爱的太早我们不能终老 提交于 2019-12-01 13:11:13
In Google Sheets, I am trying to delete an entire row when one cell in that row contains the phrase "Delivered." The onEdit function won't work for my needs because it requires me to manually make an edit to the sheet before it works - which is not what I want. I need it to delete rows automatically [in real time] because the word "Delivered" is being generated from a live web query {=index(IMPORTXML} (shipment tracking if you haven't guessed). Here is the formula I had using onEdit before I realized it wasn't what I needed: function onEdit(event) { var s = SpreadsheetApp.getActiveSpreadsheet(

Need to delete an entire row based on one cell's criteria

帅比萌擦擦* 提交于 2019-12-01 11:35:25
问题 In Google Sheets, I am trying to delete an entire row when one cell in that row contains the phrase "Delivered." The onEdit function won't work for my needs because it requires me to manually make an edit to the sheet before it works - which is not what I want. I need it to delete rows automatically [in real time] because the word "Delivered" is being generated from a live web query {=index(IMPORTXML} (shipment tracking if you haven't guessed). Here is the formula I had using onEdit before I

Google Sheets Query Language: escape apostrophe

拥有回忆 提交于 2019-12-01 03:36:54
问题 How can I escape an apostrophe inside a SQL query in Google Sheets? Here's my function: =QUERY(QUERY(IMPORTRANGE("XXXXXXX", "XXXXXX!A1:C"),"SELECT * WHERE Col2 = 'Woman's blabla: blablabla'"),"SELECT Col1, Col2") I've tried adding another apostrophe: =QUERY(QUERY(IMPORTRANGE("XXXXXXX", "XXXXXX!A1:C"),"SELECT * WHERE Col2 = 'Woman''s blabla: blablabla'"),"SELECT Col1, Col2") No luck.. and I've tried putting a backslash, no luck as well: =QUERY(QUERY(IMPORTRANGE("XXXXXXX", "XXXXXX!A1:C"),

Appending google spreadsheet arrays

不想你离开。 提交于 2019-11-30 15:25:26
When I append arrays in google spreadsheets, all of the resulting elements are not rendered in cells. For example, if I enter the formula: ={{1,2,3}, {4,5,6}} the values rendered in spreadsheet cells are 1,4,5,6. Any ideas about why this is happening, or alternatives? My broader problem is to accumulate rows from separate sheets into another sheet - I can do that via ={ImportRange(...), ImportRange(...)} but the same problem is apparent (missing the second element and beyond from the first array). Edit (2 Oct 2014) I just happened upon this when someone upvoted. The information below is

Getting the count and unique values of a column of comma separated values?

[亡魂溺海] 提交于 2019-11-30 14:40:21
Supposing all I have is the column A below + + A | B | C +--------------|---------|----------+ | | X, Y, Z | X | 3 | | X, Z | Y | 2 | | X, Y | Z | 2 + + How do I generate columns B and C - where the B column grabs the unique elements from A, and the C column generates a count of those values. =ArrayFormula(QUERY(TRANSPOSE(SPLIT(JOIN(",",A:A),",")&{"";""}),"select Col1, count(Col2) group by Col1 label count(Col2) ''",0)) QUERY function TRANSPOSE function SPLIT function JOIN function Without hidden cells is possible to do it with an alternative method than the one proposed by Adam (that did not