SUM and VLOOKUP are only a few of the functions Google Sheets offers for using mathematical formulas. When dealing with complex calculations, Apps Script can help you create a custom one. It's a difficult procedure unless you have JavaScript knowledge. As of August 2022, Google simplified the process of creating custom functions.

You can make a new function in Sheets and give it a unique name. More interesting is its reapplication to as many spreadsheets as you want, and it also appears among Google's functions list. Your first interaction with this feature may be intimidating. Still, Named functions are easy to use on your favorite Chromebooks and other computers. Here's all you need to know to get started.

What is a Named function in Google Sheets?

Named functions are similar to Google Sheets' built-in functions. The difference is that you create them and define what they do. For example, the basic SUM function adds the numbers in the columns and rows you define. Built-in functions work best when you have simple or small data to calculate, such as when you want your total earnings for the month or year.

Suppose you also want to do your taxes or inventory management. You only need to type the formula once, name it, and reuse it for the next week, month, or year. The characteristics of a Named function include the following:

  • Name: This is the name you'll type in cells to initiate the formula. You can't use an existing function name, such as SUM, AVERAGE, or DIVISION. Also, you can't use TRUE or FALSE as names or characters besides underscores to separate words.
  • Description: This field tells the spreadsheet collaborators what the function does.
  • Argument placeholders: This is an optional field for entering a description that tells everyone what values to enter when using the function.
  • Formula definition: Type your formula in this field. If you specify placeholders, you can replace spreadsheet values to illustrate those placeholders.

Before Google released the feature, Named functions were called custom functions and weren't reusable. You had to retype your formula every time you had a complicated problem. Today, Named functions make repeated calculations simpler. They also allow you to export them to a new spreadsheet and modify the formula when needed.

How to create a Named function in Google Sheets

You can create a Named function on the web version of Google Sheets from your favorite browser. You can't use the mobile app as it's designed for smaller screens and has limited functionalities. For this walkthrough, let's do some inventory matching. We want to check if a store item is listed or not. The steps for creating and using Named functions are below.

Before creating Named functions, make a copy of the spreadsheet you plan to apply it on. Then, type your formula and test it on the data. Make sure the function works and doesn't produce errors.

Create Named functions in Google Sheets from browsers

  1. Open a spreadsheet.
  2. Go to Data > Named functions.
    Access named functions under the data tab.
  3. A right sidebar appears. Select Add new function.
    You can add a new functions under the named functions sidebar.
  4. Give your function a name and description. To separate words, use only underscores.
    Create a new named function and give it a description.
  5. Type Argument placeholders for the cells your function applies to. This field is optional and doesn't affect your formula.
  6. Under Formula definition, enter your formula.
    Enter the formula you wish to use in your Sheets file.
  7. Sheets prompts you to assign placeholders for the cell and range values in your formula. Click the suggestions to do so.
    Click the prompt to assign placeholders.
  8. Select the placeholders you created before, or type a new one. Then click Define.
    From here, you can select your pre-made placeholders or assign new ones.
  9. Sheets replaces the formula values with your placeholders, which doesn't affect the function. Click Next to preview the function.
    The placeholders are now displayed on the screen. Click next to preview the functions.
  10. Add additional information about your function to help others understand it. Then click Create to save the function.
    Add any additional details, then click create to finish creating the function.

Now that we've created our Named function, let's see if it can find the product we're searching for in the inventory.

Use Named functions in Google Sheets from browsers

  1. Click a cell to place your Named function.
  2. Type = followed by your function name. For example, =IN_STOCK.
    Click the equal key and type in the name of your function.
  3. Type only the referenced cells and ranges, not the formula in full.
  4. Press Enter on your keyboard to execute the function.
    Pressing the Enter key will execute the function.

After testing the Named function on the inventory, the result is FALSE, indicating that the product we're looking for isn't listed among the available store items.

How to import Named functions in Google Sheets

The beauty of Named functions is that you don't have to retype the formula in full after the first time. More importantly, you can import the function into a new spreadsheet and edit it. If you create multiple functions, import them at once rather than importing each function individually.

  1. Open a Google Sheets spreadsheet.
  2. Go to Data > Named functions.
    Access named functions under the data tab.
  3. Click Import function.
    Select Import function to begin importing into your Sheets document.
  4. Select a sheet containing Named functions. Then click Insert.
    Select a sheet containing your named functions, then select Insert to place it into the sheet.
  5. If there are multiple functions in the sheet, you receive a prompt to select which ones to insert, or you can import all the functions.
    For sheets with multiple functions, you can choose to select one, many, or all of them for importing.

Named functions are for everyone

Named functions keep you from racking your brain and working too hard when using formulas in Google Sheets. Typing your formula in full is a one-time process, and you don't need to be a spreadsheet expert to use the function. You only need to provide the details it needs to operate and save it. Then, others can copy it across similar spreadsheets. Sheets also offers numerous tricks to make you more productive. With the cloud-based app, you can freeze cells and columns, use macros to record your actions, and clean up data in seconds.