How to create named functions in Google Sheets

Updated · DeskHowTo

In Google Sheets (verified 2026-10-24), open Data > Named functions > Add new function, enter a function name (for example DISCOUNTPRICE), add argument placeholders, paste the formula definition that uses those placeholders, then Create. Call it from any cell like =DISCOUNTPRICE(A2,B2). Named functions travel with the spreadsheet and beat copying giant formulas cell-to-cell.

Named functions are different from named ranges (cells with a name) and from LAMBDA helper patterns — they are first-class custom functions you define in the UI.

Jump to

Applies to Google Sheets in the browser (and Sheets mobile for calling functions; creating named functions is easiest on desktop web). Viewers cannot edit named function definitions.

Define and use a named function

Open Named functions

  1. Open your spreadsheet in sheets.google.com.
  2. Go to Data > Named functions.
  3. Click Add new function.

Build the definition

  1. Enter a valid function name (letters/numbers/underscores; start with a letter).
  2. Add argument names (for example price, rate).
  3. In the formula definition, write the logic using those argument names, then Create.

Call it in cells

  1. In a cell type =YOURFUNCTION(A2,B2) and press Enter.
  2. Fill down as needed; edit the definition once to update all call sites.
  3. Use Data > Named functions later to edit, duplicate or delete definitions.

Our take: name business rules, not one-off math

Put “VAT”, “margin”, or “SLA hours” in named functions so finance changes one definition instead of fifty cells.

If it fails

  • #NAME?: typo in the function name, or the named function lives in another spreadsheet you did not copy.
  • Wrong result: argument order in the call does not match the definition.
  • Cannot edit: you only have View/Comment access.
  • Need cross-file reuse: copy the sheet, or rebuild the named function in the destination file.

Frequently asked questions

What are Google Sheets named functions?

Custom functions you define once (name, arguments, formula) and call anywhere in that spreadsheet like built-ins.

How do I create a named function?

Data > Named functions > Add new function > name, arguments, formula > Create.

Named function vs named range?

Named ranges point at cells; named functions encapsulate formula logic with parameters.

Can named functions use QUERY or ARRAYFORMULA?

Yes — put supported Sheets formulas in the definition, including many array-capable functions.

Do named functions work offline?

They calculate when Sheets can evaluate the file; create/edit them while online on the web app.

Sources checked: Google Docs Editors Help: Named functions. Verified October 2026.