Spreadsheets are made up of cells that can hold many types of data. And they usually are referenced using the R1C1 notation, for e.g. B4, or N6. And a group of cells is referenced in this notation R1C1:R2C2, for e.g. B2:C6. In practice, we use such references to individual cells or a group of cells within formulas, but they can get cumbersome. Fortunately, we can name ranges or cells in Google Sheets.
Why name ranges or cells in Google Sheets?
There are notable advantages when we refer ranges by names than when we use the primitive notations as discussed above.
- Using names for ranges is more intuitive and natural than using the primitive references. For instance, we understand the name Income as opposed to E2:E11.
- Formulas are easier to build and interpret. For example, SUM(Income) is understood without much looking around than SUM(E2:E11).
Let us try and understand this with the help of an example. Consider the following spreadsheet. It consists of basic employee information.
We will name the range of cells C2:C11 (i.e. the Age column). So we select them, and navigate to Data > Named ranges. Since these cells hold the age-related values, we will name this range as Age, and click on the Done button.
Similarly, let us add another named range, that represents the entire employee table. To do so, we select the cells A2:D11, on the Named ranges sidebar, we click on Add a range. Now we key in the name Employee_Information and click on the Done button.
Let us experiment these new named ranges within formulas and validate them against those that use primitive range reference notations.
As we will notice, the formulas give the exact same results in both the cases. However, using the named ranges within the formulas gives it more meaningful interpretation.
We may want to edit or remove the named ranges in the future. We can access these options by clicking on the Edit (pencil) icon.