Questions tagged [google-sheets]

Do NOT share spreadsheets/images as the only source of data. Use markdown TEXT tables instead. Use this tag for questions about programmatically interacting with Google Sheets. Use with: [google-apps-script] for questions relating to the built-in scripting language, [google-sheets-formula] for questions relating to formula design or [google-sheets-api] and a language tag (eg:[python]) for questions relating to sheets API usage. Do NOT use with [excel].

Google Sheets is a cloud-based application and service for creating and collaborating on spreadsheet documents. The service supports an internal API for Google Apps Script as well as an External API.

Sharing your data:

Sharing your data helps other community members in visualizing your data. This can be done through

  • Tables(Mandatory):
    Markdown help can be found here. You can easily create a table using the formula: =ARRAYFORMULA("|"&A1:G20), if you want to share A1:G20. However, the first row A1:G1 must be a header row AND the second row A2:G2 should only contain dashes -- in all the cells.
  • CSV:
    Use File > Export to csv

  • Published Google sheets(in addition to text table):
    In the sheets file, click File > Share > Publish to web.

  • Share to others(in addition to text table):
    In the sheets file, click File > Share to others > Anyone with link. Note, however that sharing Google sheets this way makes your email address visible to public.

  • Screenshots(in addition to text table):
    This shows your data structure but makes it hard for anyone to copy data from the question for testing

If questions depends on external links/images, they will be closed. Text tables is mandatory.

Related tags:

52687 questions
44
votes
5 answers

How do you do dynamic / dependent drop downs in Google Sheets?

How do you get a sub-category column to populate a drop down based on the value selected in the main category drop down in google sheets? I googled around and couldn't find any good solutions, therefore I wanted to share my own. Please see my answer…
tarheel
  • 4,727
  • 9
  • 39
  • 52
44
votes
5 answers

Sum of row n through last row

I want to create a TOTAL row at the top of my spreadsheet. In this row, each cell should be the SUM of the values in the column below the TOTAL row. So for example, if the total row is Row 1, cell A1 should be the SUM of A2 through the last row in…
Nick Petrie
  • 5,364
  • 11
  • 41
  • 50
43
votes
3 answers

Google Spreadheets Scripts: check if cell is empty

I want to input a variable in a cell only if the cell is empty. The if statement, however, does not work. Any advice? var ss=SpreadsheetApp.getActiveSpreadsheet(); var r=ss.getRange("'odpovědi'!A2:J"); var rws=r.getNumRows(); ax=r.getCell(rws-1,…
orobinec
  • 445
  • 1
  • 4
  • 5
43
votes
3 answers

Google sheets duration to seconds

I have a cell formatted as a duration (6:49:00) I want to convert that to an Integer of total seconds This formula gives me the right number of seconds =C3*60 409:00:00 <-- But I want this as just 409
Mathias
  • 4,243
  • 4
  • 25
  • 34
43
votes
4 answers

How do I combine COUNTIF with OR

In Google Spreadsheets, I need to use the COUNTIF function on a range with multiple criteria. So in the table below, I would need to have something like =COUNTIF(B:B,"Mammal"or"Bird") and return a value of 4. A |B ------------------- Animal…
43
votes
15 answers

New Google Sheets custom functions sometimes display "Loading..." indefinitely

SPECIFIC FOR: "NEW" google sheets only. This is a known issue as highlighted by google in the new sheets. Issues: If you write complex* custom functions in google-apps-script for google sheets, you will occasionally run into cells which display a…
43
votes
6 answers

How to protect the Apps Script code in a Google spreadsheet?

I have written some code for my Google spreadsheet with the script editor. I want to share this spreadsheet with my clients but I don't want to share the code I have written. This code adds a menu to my spreadsheet which contains useful functions…
namit
  • 6,780
  • 4
  • 35
  • 41
42
votes
6 answers

How to generate an uuid in google sheet?

How to generate an uuid in google sheet (for exemple ccb8a660-91c9-a556-58e0-4fa7-229516872004). Either with a macro? or a formula?
42
votes
3 answers

Google sheet embed URL documentation

Does anyone know if there is any official documentation for google spreadsheet embed URL paramaters? That is, given an embed URL from Google Sheets like…
mmccarn
  • 479
  • 1
  • 5
  • 7
42
votes
13 answers

Is there a way to evaluate a formula that is stored in a cell?

In a Google Docs spreadsheet, I'm looking for something like =EVAL(A1) where A1 is set to "=1+2". I found out that in MS Excel there is an EVALUATE() function (which seems a bit tricky to use properly). But I could not find anything similar in…
41
votes
11 answers

arrayformula sum in Google spreadsheet

How do you arrayformula() a sum() such as: =sum(A1:H1) I need to go down 1000 rows.
jason
  • 3,811
  • 18
  • 92
  • 147
41
votes
7 answers

google spreadsheet: join arrays using function NOT CODE

I have one array 1 2 3 another array 4 5 6 How do I use one function to join the 2 arrays? 1 2 3 4 5 6
jason
  • 3,811
  • 18
  • 92
  • 147
40
votes
4 answers

Get column values by column name not column index

I'm new to Google Apps Script. I want to get the value of a specific cell by it's column name, not the column index. Here is what I have: var rows = sheet.getDataRange(); var values = rows.getValues(); var row =values[1]; var rowStaffName =…
Kelli Roddy
  • 453
  • 1
  • 5
  • 8
40
votes
4 answers

How to automatically import data from uploaded CSV or XLS file into Google Sheets

I have a legacy database system (not web accessible) on a server which generates CSV or XLS reports to a Google Drive folder. Currently, I am manually opening those files in Drive web interface and converting them to Google Sheets. I would rather…
40
votes
11 answers

Delete a row in Google Spreadsheets if value of cell in said row is 0 or blank

I'd like to be able to delete an entire row in a Google Spreadsheets if the value entered for say column "C" in that row is 0 or blank. Is there a simple script I could write to accomplish this? Thanks!
Zack
  • 399
  • 1
  • 3
  • 4