15 Data Ranges and Named Ranges

Datasets

Excel is all about data. The data is for viewing, organizing, sorting/filtering, analyzing, and calculating so that business problems can be considered and solved. The more organized the data is, the better you will be able to use it, analyze it, and get the needed calculations, graphs, and pivot tables to answer your questions.

A dataset is a range of contiguous cells on an Excel worksheet, which contain data to analyze. In a worksheet, cells with data on a spreadsheet would be a data set. However, a dataset doesn’t really mean anything until you determine what it exists for and what kind of analysis needs to happen.

ACTION: Quick Task

Let’s look at an image of some Excel work. In it the cells A1 through D7 have data that seems related to each other. Cells E1-E6 is a column of data, as is the column of G1-G5. This is all part of a dataset, although only cells A1 – C7 seem to meet the dataset definition of being contiguous.

Image of MS Excel finished chapter activities

MedAttrib: author-generated. MS Excel dataset.

Data Ranges

The phrase data range tends to be a statistical term to refer to the spread of data from the lowest to the highest value in the distribution. However, Excel refers to named data sets as a named range, so for the purposes of this textbook, we will refer to dataset and data range (in nonstatistical analysis) as the same thing. As a reference to data in a sheet or a table, range of data is simply a set of data, a designated range of cells in tabular format. A whole spreadsheet would be a dataset; a data range would be a group of cells that are being specifically worked with.

  • Cell contents: As discussed before, all data in Excel (other than inserted objects like pictures) is input into cells. Each cell is something that, as part of a row and column, can be sorted, calculated, and tell a story.
  • Cell addresses: Data are entered and managed in cells by entering numeric and non-numeric data. Each cell in an Excel worksheet contains an identification address, which is defined by a column letter followed by a row number. For example, the top left cell A1. This would be referred to as cell location A1 (or cell reference A1). You can navigate in an Excel worksheet with your mouse pointer or using the arrow buttons on your keyboard.
  • Column Headings: In Excel, data rarely means anything to a viewer if there is no context attached to it. Commonly this is done through column headings, which identify what the content in the column is supposed to be. This can also be done as row headers instead, but in this course we’ll mostly use the standard column headings.
  • Rows and columns: These make up the range of data in a dataset, with or without column headings.

Data range activities

A range of data in a dataset can be:

  • Resized: You can resize columns from the Home tab Cells group to reveal information that looks cut off, or to narrow them if there is too much space. Same with rows if the row is too tall or seems to have cut off anything other than the first line of text.
  • Inserted/Deleted: Rows and columns can be inserted as needed from the Home tab Cells group, in order to expand for data to be added. Existing columns and rows can also be deleted.
  • Hide/Unhide: You may have a worksheet with a lot of columns, but really only need to see some of the data to decision. Hiding columns or rows can help you focus.
  • Sorted: In addition, information in a range of data can be sorted from the Data tab Sorts & Filters group, so that one or more column)s) shows information in an alphanumeric order or in some more customized order.
  • Filtered: A range of data may have information about more customers or other content than you need: using a filter from the Data tab Sorts & Filters group lets you temporarily hide unwanted information so you can get a snapshot view.
  • Freezing Panes: If a range of data is made up of hundreds of records – long enough that you need to scroll down several pages to see it all, or over enough columns that you can’t see the important left-most columns, you can freeze a column or two, or the header row, so that the information remains in view no matter how much you have to scroll.

ACTION: Quick Task

Back to the image again:

Image of MS Excel example datasets

MedAttrib: author-generated. MS Excel dataset.

In here, all three batches of data are ‘ranges’ of data. This is important, because we may want to actually reference them in a tidy way for formulas and general reference. As they exist now, they are simply designated by the cell collections. A1:C7, E1-E6, G1-G5.

Named Ranges

As noted above, a range of data is simply a dataset that can and will have work done with it. However, what needs to happen with data is what is important. Formulas that calculate data for specific purposes need to be able to find the data and easily add it to the formula. Sometimes the data will be all the contents of a table. Sometimes it will be only a column or two, or a few rows in a larger data range. In these cases, being able to “set aside” the data range in an identifiable way can make writing and fixing formulas easier. You can do this by identifying/naming data ranges.

  • Selecting: You select a data range by choosing a selection of row and column cells, such as dragging your cursor to select A1 through D10, or typing A1:D10.
  • Naming: To make that data range useful and easy to refer to in a formula, you need to name it. This can be done in the Formulas tab’s Defined Names group by using the Name Manager panel to give the data range a name. Once this is done, you can see a list of every named data range in the Excel Address field.
  • Use in formulas: In a formula, you can use the named range as the data range reference in the formula, such as =SUM(Totals)

How to Create a Named Ranges

  1. Select the range of cells you want to name. (For example, highlight cells A2 through A10 that contain monthly sales.)
  1. Go to the Formulas tab on the Ribbon.
  1. Click on “Define Name.”
  1. In the dialog box:
    – Type a name (no spaces—use underscores if needed, like Monthly_Sales)
    – Make sure the range is correct
    – Click OK

Boom! You’ve just created a named range.

Why Use Named Ranges?

  • Clarity: Instead of writing =SUM(A2:A10), you can write =SUM(Monthly_Sales)
  • Consistency: If you use the same range in multiple formulas, you only need to update it once.
  • Navigation: You can quickly jump to a named range using the Name Box (top-left corner above column A).

Example Walkthrough

Let’s say we have a list of expenses in cells B2 to B12. We want to calculate the total.

  1. Select B2:B12
  1. Go to Formulas → Define Name
  1. Name it Expenses
  1. In a cell, type: =SUM(Expenses)

Notice how much easier that is to read than =SUM(B2:B12)? It’s like giving your data a label.

Managing Named Ranges

To edit or delete a named range:
– Go to Formulas → Name Manager
– From here, you can change the range, rename it, or remove it.

The first several section of this page down to the section titled “How to Create a Named Ranges” comes from the pressbook by Lave, B. (n.d.). Chapter 7: Data ranges. In MS Excel Bootcamp. Open Washington Pressbooks.

Chapter 7: Data Ranges

AI Use Statement:

AI Copilot was used to create the content from the section titled “How to Create a Named Ranges” and down, the result was then reviewed and edited for accuracy and flow.