How to use custom values ​​in Google Sheets cells

Last update: 31/10/2026

  • How to change the default values ​​of check boxes using data validation.
  • Creating custom functions using Apps Script and JavaScript to extend calculation capabilities.
  • Script optimization using two-dimensional arrays to improve sheet speed.
  • Integration of external services and automation of customized workflows.
Top-down view of analytical data sheets and a laptop, ideal for representing data management in Google Sheets.

Have you ever felt limited by the factory-installed options in Google SheetsThe truth is, while Google Sheets is fantastic, there comes a time when we need cells to do more specific things, like Use custom values ​​in Google Sheets cells or create formulas that don't exist in the standard menu. Don't worry, there's a solution, and it's simpler than it seems.

In this article, we'll break down in detail how you can take your boards to the next level. From simple tricks to... data validation so that your checks are not just a simple true or false, up to the creation of custom functions through code to automate complex processes. Get ready to stop fighting with the spreadsheet and make it work for you.

Customizing checkboxes

When we insert a checkbox, Google Sheets assigns the default values ​​TRUE and FALSE. However, many people prefer that, when the box is checked, the value is, for example, "Completed," and when it is unchecked, it's "Pending." To achieve this, no magic is required; simply go to the Data validation.

Exclusive content - Click Here  How to leave a class in Google Classroom

Once you have your mailbox, you must access the validation rules and look for the option to change the marked and unmarked valuesBy replacing the default values ​​with custom words or numbers, you can integrate these fields with other tools on the platform. For example, it's very useful to combine this with the conditional formatting So that when you mark a task as done, the cell automatically changes color or the text is crossed out, giving you an immediate visual cue.

Furthermore, these fields are pure gold when combined with formulas. If you use the function COUNTIFYou can count how many items on a list are checked off without having to go one by one, which is ideal for keeping track of projects or daily to-do lists.

How to use custom values ​​in Google Sheets cells
How to use custom values ​​in Google Sheets cells

Custom functions with Apps Script

There are times when built-in functions like SUM, AVERAGE, or VLOOKUP fall short. This is where [the other function] comes in. Script Appswhich allows you to write code in JavaScript to create your own formulas. Basically, you can design a function that does exactly what you want and use it in the cell as if it were an official Google function. Essential for creating custom values ​​in Google Sheets cells.

Steps to create your own feature

If you're up for coding, the process is quite straightforward. First, open your spreadsheet and go to the menu of Extensions and select Apps ScriptOnce inside the editor, delete any previous code and write your function. For example, if you want a function that doubles a number, you would define a function called DOUBLE that multiplies the input value by two. After save the projectYou can now go to any cell and type =DOUBLE(A1) to see the result.

Exclusive content - Click Here  How to link a kahoot to Google Slides

If the code sounds like gibberish to you and you don't have time to learn JavaScript, don't worry. There's the Google Workspace Marketplacewhere you can search for add-ons already created by other users. Just go to Add-ons, search for "custom feature" and install the one that best suits your needs, after authorization of permits corresponding.

Golden rules and limitations

To ensure your functions work correctly, you must follow certain guidelines. The name of your function cannot match an existing one (like SUM) nor end with an underscore. Furthermore, it is crucial that the results be deterministic; this means you cannot use volatile functions like NOW() or RAND() as arguments, as the system would freeze. loading indefinitely.

Regarding performance, you should know that each call to a custom function makes a request to the server, which can slow down the spreadsheet if you have thousands of them. The professional solution is use two-dimensional arraysInstead of calling the function on each cell, you design the function to accept an entire range and return an array of results, thus optimizing the execution speed considerably.

Exclusive content - Click Here  How to delete duplicate photos in Google Photos
Business analyst reviewing a colorful bar chart, symbolizing the power of advanced formulas.
How to use custom values ​​in Google Sheets cells

Advanced capabilities and external services

Custom functions aren't limited to performing mathematical calculations. They can interact with Google services that don't require personal user data. For example, you can use the Language service to automatically translate texts or the URL Fetch service for bring real-time data from an external website via an XML feed.

It is important to mention that these functions have a 30-second execution limitIf the process takes longer, you'll see the annoying "time exceeded" error. If you need to make significant changes to the spreadsheet, such as editing cells other than the one containing the formula itself, custom functions won't work; in that case, you'll need to create a custom menu run the script manually.

To share these features with other colleagues, you have several options. You can copy the code manually on another sheet, create a full copy of the document, or publish the script as an official add-on. Remember that anyone with editing permissions In the document you can also modify the script code.

Mastering the use of custom values ​​in Google Sheets cells and creating functions using Apps Script transforms a simple table into a powerful management tool, allowing everything from automating visual tasks through conditional formatting to integrating external data and performing complex calculations using JavaScript, always optimizing performance through arrays to prevent the sheet from becoming slow.