# Range Types

You can define four different kinds of bands as follows:

* \_\_ : This range moves down and inserts full rows. For example: \_\_CUSTOMER\_\_
* \_ : This range is similar to \_\_ but cells outside of the range won't move down. For example: \_CUSTOMER\_
* II\_ : This range moves to the right and inserts full columns. Note that the first character is the letter i, not a pipe (|). For example:  II\_CUSTOMER\_II
* I\_ : This range is similar to II\_ but cells outside of the range won't move right. For example: I\_CUSTOMER\_I

In the following example, if you name A1:D7 as \_CUSTOMER\_ Cell E8 won't move when inserting down. If you name it as \_\_CUSTOMER\_\_ Cell E8 will move to the last inserted cell.

<figure><img src="https://lh7-us.googleusercontent.com/mEOpv16tgPRGey48ZzSsa0l0yWMLwwO8TgwSWfE7GdN4v-HSpQzceSiABMfuc2bWJQ1gMpme9qIJn2B5y1d-n3V8BPbFUFTRKmimorLAVfrqrGT5GECG3BezZBTcV6OkdbBOGL3gmfwpZwyabNj3qA" alt="" width="375"><figcaption></figcaption></figure>

## X Ranges

This is a special range where X means delete, which would remove the last row after a named range inserts the new rows.

Let's imagine we want to make a simple report on a list of items and their prices.

So, we create a new template, define a title row, and insert a named range on A2:B2 to propagate the data. But we also want to know all the total cost of all items, so we add a formula on B3:

<figure><img src="https://lh7-us.googleusercontent.com/dp6ECqDo3_zuP0Qvy9jgMErEn44ZU8-RlXlEgA6qc5kbC45M4dgAVMem-QqCwfDL8zkR_nTNTbV49DrpHINq9L-jskBr3mZMxQAajJcCzIx8F_7HEToRbDiu1r4OEmxgydz1917D-UqKu_3HIjZfcw" alt="" width="375"><figcaption></figcaption></figure>

When you run this report, rows will be inserted between row 2 and 3, but the formula SUM(B2:B2) won't change. Nothing has been inserted between B2 and B2, so the sum range will remain constant.

So, we need to have a SUM range that can expand. We will define:

<figure><img src="https://lh7-us.googleusercontent.com/zcfWuvQ-03dvObz0g8dYjRM946yxTb820COHCJYgPk2p7O7KaDG2Da7qkzNJrlQogBbeNGyT6XATWUVC1axAjiZZmovptSKYPC_hmCiYbGVxO1_kVLgFsrAU6aht7iKaoBosqjwwA8CEfAqjxMEimg" alt="" width="375"><figcaption></figcaption></figure>

Now, when rows are inserted between row 2 and 3, the formula will be updated to reflect the new rows.

In this particular case, this solution might be enough. Just leave an empty row after the range so formulas expand, and then you can hide the extra row or just leave it there.

But, if we were for example creating a chart, this extra row will be on the chart too.

This is where the X range comes to rescue. X ranges are normal named ranges with an “X” at the end. Once it is expanded it will erase the row immediately after the range, or column if it is a column range.

Example of X ranges: \_\_Customer\_\_X, |\_*Customer*\_IX
