Before, you could only do this usingApps Script.
Now, there’s a user-friendly tool in your spreadsheet called Named Functions.
Keep in mind that our example is simply for this guide.
you’re free to set up any key in of function you want.
To get started, open a sheet and head to the Data tab.
Select “Named Functions” which opens the sidebar where you’ll create your function.
Start by entering a name for your function after theequal sign in a cell to begin your formula.
it’s possible for you to also use the default name provided which is MY_FUNCTION1.
Then, add a function description.
Next, add your Argument Placeholders.
While these are also optional, they’re necessary for assembling most formulas.
Examples include value, cell, range, value1, cell2, and range3.
For our example, we simply add “range.”
To finish off the main area, add the Formula Definition.
This is the formula you want to use to define your Named Function.
Below is the formula definition for our example.
Click “Next.”
This includes a description and example of each argument.
you’re free to see what we include in the screenshot below.
Click “Create” to secure your new function.
You’ll then be directed to the main Named Functions sidebar where you’ll see your new function listed.
Using Your Named Function
Now it’s time to test your new function.
Add an equal sign and your function name followed by the arguments.
Finish your formula, press Enter or Return, and confirm that it works as expected.
Go to Data > Named Functions.
snag the three dots to the right of your function in the sidebar and choose “Edit.”
You’ll see the same screens as the initial setup for the function.
Make your adjustments, select “Next,” and then click “Update.”
Your sheet automatically updates to follow your changes.
go for the three dots to the right in the Named Functions sidebar and pick “Remove.”
You may then need to adjust your sheet if you have a formula for the deleted function.
You should seethe #NAME?
errorin the cell once the function is removed, like our screenshot below where we deleted MY_FUNCTION6.
Go to Data > Named Functions to fire up the sidebar and select “Import Function.”
You’ll see a window open displaying all of the Named Functions in that workbook.
Maybe you’ve been using Apps Script withJavaScriptto create your own custom functions.
Or maybe, you’re completely new to making a function.
Either way, the Named Functions tool is a terrific, useful Google Sheets feature.
Give it a try!