In this article:

How to Create a Google Sheets Variable (2025 Guide)

January 13, 2025

How to Create Google Sheets Variables

In Google Sheets, variables are commonly created as "named ranges." This allows you to assign a memorable name to a specific cell or range of cells instead of using standard cell references like A1 or B2:B6. Here's how to create a named range:

1. Select the cell or range of cells you want to name.

This can be a single cell, a group of cells, or a range that you frequently reference in your formulas.

Below is a sample data set:

google sheets variable

2. Open the sidebar for named ranges.

Navigate to the menu: Data > Named ranges.

google sheets variables

3. Enter a name for your range in the text field provided. 

This name will act as your "variable." Choose a name that is easy to remember and reflects the data or value it represents.  In our example, we have "SalesData." Confirm by clicking Done.

create google sheets variables

Example

Once you have created a named range, you can use it in your formulas by typing the name you assigned to it. For example, if you named a range "SalesData," you could use it in a SUM formula like so:

=SUM(SalesData)

how to use google sheets variables

We hope that this article has helped you and given you a better understanding of how to create and use a Google Sheets variable using named ranges. If you enjoyed this article, you might also like our articles on how to highlight distinct values in Google Sheets and how to force Google Sheets to recalculate.

Turn PDFs into spreadsheet tables with AI

Use Lido to extract data from contracts, invoices, financials, and more in seconds. Save time, reduce errors.
  • No credit card required
  • 20 free pages