Range Definition and Use in Excel Spreadsheets

How to improve identification of a group or block of cells

Woman using laptop in office
Westend61 / Getty Images

A range is a group or block of cells in a worksheet that are selected or highlighted. Also, a range can be a group or block of cell references that are entered as an argument for a function, used to create a graph, or used to bookmark data.

The information in this article applies to Excel versions 2019, 2016, 2013, 2010, Excel Online, and Excel for Mac.

Contiguous and Non-Contiguous Ranges

Screenshot of Excel showing various ranges

A contiguous range of cells is a group of highlighted cells that are adjacent to each other, such as the range C1 to C5 shown in the image above.

A non-contiguous range consists of two or more separate blocks of cells. These blocks can be separated by rows or columns as shown by the ranges A1 to A5 and C1 to C5.

Both contiguous and non-contiguous ranges can include hundreds or even thousands of cells and span worksheets and workbooks.

Range Names

Ranges are so important in Excel and Google Spreadsheets that names can be given to specific ranges to make them easier to work with and reuse when referencing them in charts and formulas.

Select a Range in a Worksheet

When cells have been selected, they are surrounded by an outline or border. By default, this outline or border surrounds only one cell in a worksheet at a time, which is known as the active cell. Changes to a worksheet, such as data editing or formatting, affect the active cell.

When a range of more than one cell is selected, changes to the worksheet, with certain exceptions such as data entry and editing, affect all cells in the selected range.

Directly above shot of coffee cup and computer keyboard on table indicating the shift and arrow keys
Getty Images/Jurmin Tang / EyeEm

There a number of ways to select a range in a worksheet. These include using the mouse, the keyboard, the name box, or a combination of the three.

To create a range consisting of adjacent cells, drag with the mouse or use a combination of the Shift and four arrow keys on the keyboard. To create ranges consisting of non-adjacent cells, use the mouse and keyboard or just the keyboard.

Select a Range for Use in a Formula or Chart

When entering a range of cell references as an argument for a function or when creating a chart, in addition to typing in the range manually, the range can also be selected using pointing.

Ranges are identified by the cell references or addresses of the cells in the upper left and lower right corners of the range. These two references are separated by a colon. The colon tells Excel to include all the cells between these start and end points.

Range vs. Array

At times the terms range and array seem to be used interchangeably for Excel and Google Sheets since both terms are related to the use of multiple cells in a workbook or file.

Screenshot of Excel showing a range

To be precise, the difference is because a range refers to the selection or identification of multiple cells (such as A1:A5) and an array refers to the values located in those cells (such as {1;2;5;4;3}).

Some functions, such as SUMPRODUCT and INDEX, take arrays as arguments. Other functions, such as SUMIF and COUNTIF, accept only ranges for arguments.

That's not to say that a range of cell references cannot be entered as arguments for SUMPRODUCT and INDEX. These functions extract the values from the range and translate them into an array.

For example, the following formulas both return a result of 69 as shown in cells E1 and E2 in the image.

=SUMPRODUCT(A1:A5,C1:C5)
=SUMPRODUCT({1;2;5;4;3},{1;4;8;2;4})

On the other hand, SUMIF and COUNTIF do not accept arrays as arguments. So, while the formula below returns an answer of 3 (see cell E3 in the image), the same formula with an array would not be accepted.

COUNTIF(A1:A5,"<4")

As a result, the program displays a message box listing possible problems and corrections.